Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more
19 votes
Accepted

What does AI software look like, and how is it different from other software?

Code in AI is not in principle different from any other computer code. After all, you encode algorithms in a way that computers can process them. Having said that, there are a few points where your ...
Oliver Mason's user avatar
  • 5,387
12 votes
Accepted

How can the convolution operation be implemented as a matrix multiplication?

To show how the convolution (in the context of CNNs) can be viewed as matrix-vector multiplication, let's suppose that we want to apply a $3 \times 3$ kernel to a $4 \times 4$ input, with no padding ...
nbro's user avatar
  • 40.8k
10 votes

What does AI software look like, and how is it different from other software?

Oliver Mason's answer is quite good, but I think it can be expanded upon a bit. I think there are extra factors that could be popularly interpreted as making AI code difficult to read (as compared to ...
John Doucette's user avatar
9 votes
Accepted

How fast is TensorFlow compared to self written neural nets?

I wanted to know how the performance of my net would be compared to the same in Tensor Flow. Not to specific but just a rough aproximation. This is very hard to answer in specific terms because ...
icc97's user avatar
  • 210
8 votes

How is this Pytorch expression equivalent to the KL divergence?

This is the analytical form of the KL divergence between two multivariate Gaussian densities with diagonal covariance matrices (i.e. we assume independence). More precisely, it's the KL divergence ...
nbro's user avatar
  • 40.8k
7 votes
Accepted

Are we technically able to make, in hardware, arbitrarily large neural networks with current technology?

The approach you describe is called neuromorphic computing and it's quite a busy field. IBM's TrueNorth even has spiking neurons. The main problem with these projects is that nobody quite knows ...
BlindKungFuMaster's user avatar
7 votes

Is it possible to implement Asimov's Three Laws of Robotics?

The most challenging part is this section of the first law: or through inaction allow a human being to be harmed Humans manage to injure themselves unintentionally in all kinds of ways all the ...
Ben N's user avatar
  • 2,609
7 votes
Accepted

What are the approaches to teach AI to how to render html page based on its source code?

The rendering process for browsers is very well defined, and has a very rigid definite ruleset where (virtually) every accountability is noted and handled. This is not optimal for Machine Learning, ...
bren's user avatar
  • 186
7 votes

What does AI software look like, and how is it different from other software?

This may be a much simpler explanation than you're looking for, but in Machine Learning Zero to Hero, Google engineer Laurence Moroney summarized it in a way that I thought was brilliant. Paraphrasing ...
StackOverthrow's user avatar
6 votes

Is it possible to implement Asimov's Three Laws of Robotics?

Defining "harm" and in particular, "allowing harm via inaction" in any meaningful way would be difficult. For example, should robots spend all their time flying around attempting to prevent humans ...
NietzscheanAI's user avatar
6 votes
Accepted

How does the implementation of the VAE's objective function equate to ELBO?

I don't want to think about the correctness of your supposed ELBO equation now. Nevertheless, it's true that the ELBO can be rewritten in different ways (e.g. if you expand the KL divergence below, by ...
nbro's user avatar
  • 40.8k
6 votes
Accepted

How is this Pytorch expression equivalent to the KL divergence?

The code is correct. Since OP asked for a proof, one follows. The usage in the code is straightforward if you observe that the authors are using the symbols unconventionally: ...
Sycorax's user avatar
  • 473
6 votes
Accepted

What exactly is an XPU?

XPU is a device abstraction for Intel heterogeneous computation architectures, which can be mapped to CPU, GPU, FPGA and other accelerators. The "X" from XPU is just like a variable, like in ...
JVGD's user avatar
  • 1,138
5 votes
Accepted

What are other ways of handling invalid actions in scenarios where all rewards are either 0 (best reward) or negative?

1) Is there any way to set the initial Q-values for the actions? You can generally do this, but you cannot specify specific weights for specific actions in specific states. Not through the network ...
BlueMoon93's user avatar
5 votes
Accepted

How should I handle action selection in the terminal state when implementing SARSA?

The value $Q(s', ~\cdot~)$ should always be implemented to simply be equal to $0$ for any terminal state $s'$ (the dot instead of an action as second argument there indicates that what I just wrote ...
Dennis Soemers's user avatar
  • 10.3k
5 votes
Accepted

Could an AI be killed in an infinite loop?

This is a hard to answer question because a truly correct answer would involve static analysis of a given Intelligence to determine whether it has the computational capability to generate a looping ...
Tim Atkinson's user avatar
5 votes

Why can the Bellman equation be turned into an update rule?

Why are we allowed to convert the Bellman equations into update rules? There is a simple reason for this: convergence. The same chapter 4 of the same book mentions it. For example, in the case of ...
nbro's user avatar
  • 40.8k
5 votes

What are some alternatives to "Papers with Code"?

Recently arxiv.org added a Code Tab towards the end of paper descriptions. Which contains links to both the official and community code. I don't know if this is the case for all the papers or not ...
Saurav Maheshkar's user avatar
5 votes
Accepted

How is the AI in 3d games implemented?

Overlap between AI and "Game AI" Nowadays, if you search for AI online, you will find a lot of material about machine learning, natural language processing, intelligent agents and neural ...
Neil Slater's user avatar
  • 32.4k
4 votes

Are we technically able to make, in hardware, arbitrarily large neural networks with current technology?

If neurons and synapses can be implemented using transistors, I hope you are not talking about the neural networks which are currently winning all competitions in machine learning (MLPs, CNNs, RNNs, ...
Martin Thoma's user avatar
  • 1,055
4 votes
Accepted

How to distinguish AI modeling from implementation?

One good way of differentiating modelling and implementation is to consider that models occupy a much higher level of abstraction. To continue with the mathematical example: even though experimental ...
NietzscheanAI's user avatar
4 votes
Accepted

What are the minimum requirements to call something artificial neural network?

If you pick up a textbook on Neural Networks, you'll find that the simplest examples shown are ones that just implement an AND gate or something. They're trivial, probably fewer lines of code than ...
mindcrime's user avatar
  • 3,757
4 votes

How to implement an "unknown" class in multi-class classification with neural networks?

The usual way to implement this would be to add the new class with data examples. Some things you need to address: Sourcing new data for your "other" class. Ensuring the amount and variation of ...
Neil Slater's user avatar
  • 32.4k
4 votes
Accepted

How is the convolution layer is usually implemented in practice?

I don't think that to understand convolution you need to dig into the nested code of huge libraries, since the code becomes quickly really hard to understand and convoluted (ba dum tsss!). Joking ...
Edoardo Guerriero's user avatar
4 votes

What are some alternatives to "Papers with Code"?

Another good resource is the free CatalyzeX browser extension — it adds in-line links to any relevant code wherever you come across papers on various websites: AI/ML Papers with Code Everywhere - ...
Gaurav Ragtah's user avatar
4 votes
Accepted

Why in Multi-Head Attention implementation should we use $3$ linear layers for Q, K, V instead of $3 * h$ layers?

It is just an optimization technique. If you have a vector $x$ of size $d$ and you want to multiply with $n$ different matrices $W_i$ of shape $d \times d_k$, then you could simply stack these ...
pi-tau's user avatar
  • 805
3 votes

How to implement an "unknown" class in multi-class classification with neural networks?

If you are using a softmax distribution for your classification, then you could determine what your baseline max probability is for correctly classified samples, and then infer if a new sample doesn't ...
Karl Wenzel's user avatar
3 votes

How fast is TensorFlow compared to self written neural nets?

A lot. There are all these optimizations that we might not have thought of like combining layers, functions, etc. I am a pytorch guy though, its clean and doesn't get in your way like tensorflow does.
Rajat Pundir's user avatar
3 votes

How to distinguish AI modeling from implementation?

In AI (but in general too, I believe), a simplification is that modeling is more akin to Mathematics (and related hard sciences involved, like Physics and... Computer Science), and implementation to ...
Eric Platon's user avatar
  • 1,510
3 votes

State representation of position in 2D plane for Reinforcement Learning (Q Learning)

I think your net should have the various actions as outputs, but I am not an expert in Deep Nets. I just think that that light form of multi-task learning might be better. The idea of multi-task ...
marcotama's user avatar
  • 156

Only top scored, non community-wiki answers of a minimum length are eligible