Questions tagged [calculus]
For questions related to calculus (developed, among others, by Newton and Leibniz), in the context of AI (and, in particular, machine learning).
27 questions
0
votes
1
answer
38
views
Why is gradient clipping not preventing my gradient descent from going out of bounds?
I'm exploring machine learning and currently studying calculus, specifically gradient descent. To practice, I am using the function: $$ f(x,y)= x^{2}y $$
I have implemented the gradient descent ...
0
votes
0
answers
54
views
Neural networks with a continuous function as the input
I am rethinking image recognition algorithms, and want to use an idea I saw in a 3Blue1Brown video:
The basic idea is to map pixels on an image to a specific frequency—every point is distinct—and if ...
3
votes
1
answer
119
views
What is the partial derivative $\frac{\partial y}{\partial x_1}$ in this neural network?
The answer is supposed to be -6, but I don't know how to get that.
Also, in a NN, is that 2nd hidden layer possible, where the neurons are not dependent on all the neurons of the previous layer?
1
vote
1
answer
149
views
How do policy gradients work?
If I understand it correctly from the following equation
$$U(\theta)=\mathbb{E}_{\tau \sim P(\tau;\theta)}\left [ \sum_{t=0}^{H-1}R(s_t,u_t);\pi_{\theta} \right ]=\sum_{\tau}P(\tau;\theta)R(\tau)$$
...
3
votes
0
answers
232
views
Best calculus books for Deep Learning
Recommend some calculus books for Deep Learning and neural networks. I know what is integration, differentiation, derivates, limits on a based level. I would like to understand on deep level the ...
0
votes
0
answers
159
views
Is my calculation of the partial derivative of the cost function with respect to a single weight in the first layer correct?
I'm trying to understand the chain rule of backpropagation.
This is what I understood. Is it correct?
$$ \frac{\partial E }{ \partial w} = \sum_{i} \frac{\partial E }{ \partial a_i^{(l)} } (\sum_{j} \...
0
votes
2
answers
242
views
How the vector-space isomorphism between $\mathbb{R}^{m \times n}$ and $\mathbb{R}^{mn}$ guarantees reshaping matrices to vectors?
Consider the following paragraph from section 5.4 Gradients fo Matrices of the chapter Vector Calculus from the textbook titled Mathematics for Machine Learning by Marc Peter Deisenroth et al.
Since ...
0
votes
1
answer
52
views
Which is more popular/common way of representing a gradient in AI community: as a row or column vector?
Consider the following remark about writing gradients from the chapter named Vector Calculus from the test book titled Mathematics for Machine Learning by Marc Peter Deisenroth et al.
Remark (...
0
votes
1
answer
144
views
What is the rigorous and formal definition for the direction pointed by a gradient?
Consider the following definition of derivative from the chapter named Vector Calculus from the test book titled Mathematics for Machine Learning by Marc Peter Deisenroth et al.
Definition 5.2 (...
0
votes
1
answer
1k
views
What are the Calculus books recommended for beginner to advanced researchers in artificial intelligence?
Calculus is a branch of mathematics that primarily deals with the rate of change of outputs of a function w.r.t the inputs.
It contains several concepts including limits, first-order derivatives, ...
0
votes
1
answer
366
views
How many directions of gradients exist for a function in higher dimensional space?
Gradients are used in optimization algorithms. Based on the values of gradients, we generally update the weights of a neural network.
It is known that gradients have a direction and the direction ...
1
vote
1
answer
83
views
What all does the gradient tells us other than the direction to move parameters?
Gradients are used in optimization algorithms.
I know that a gradient gives us information about the direction in which one needs to update the weights of a neural network. We need to travel in the ...
0
votes
1
answer
124
views
Why the partial derivative is $0$ when $F_{ij}^l < 0$?. Math behind style transfer
I am currently in the process of reading and understanding the process of style transfer. I came across this equation in the research paper which went like -
For context, here is the paragraph -
...
5
votes
2
answers
1k
views
Are calculus and differential geometry required for building neural networks?
I've been studying geometry and linear algebra for months with the goal to build neural networks. But now I'm reading that perceptrons require fitting curves, and curves are not expressed as linear ...
0
votes
1
answer
1k
views
What is the correct formula for updating the weights in a 1-single hidden layer neural network?
I'm creating a neural network with 3 layers and no bias.
On internet I saw that the expression for the derivative of the weights between the hidden layer and the output layer was:
$$\Delta W_{j,k} = (...
-1
votes
1
answer
264
views
How can the gradient of the weight be calculated in the viewpoint of matrix calculus?
Let $\sigma(x)$ be sigmoid function. Consider the case where $\text{out}=\sigma(\vec{x} \times W + \vec{b})$, and we want to compute $\frac{\partial{\text{out}}}{\partial{w}
}.$
Set the dimension as ...
1
vote
0
answers
82
views
BlackOut - ICLR 2016: need help understanding the cost function derivative
In the ICLR 2016 paper BlackOut: Speeding up Recurrent Neural Network Language Models with very Large Vocabularies, on page 3, for eq. 4:
$$ J_{ml}^s(\theta) = log \ p_{\theta}(w_i | s) $$
They have ...
1
vote
0
answers
35
views
For the generalised delta rule in back-propogation, do you subtract the target from the obtained output, or vice versa?
When I look up the generalised delta rule equation for back-propogation, I am seeing two conflicting equations.
For example, here (slide 20), given $o$ (the output, defined in slide 18), $z$ (the ...
0
votes
1
answer
606
views
What is the derivative of a specific output with respect to a specific weight?
If I have a neural network, and say the 6th output node of the neural network is:
$$x_6 = w_{16}y_1 + w_{26}y_2 + w_{36}y_3$$
What does that make the derivative of:
$$\frac{\partial x_6}{\partial w_{...
4
votes
1
answer
465
views
How is the log-derivative trick of a trajectory derived?
I am looking at this formula which breaks down the gradient of $P(\tau |\theta)$ the first part is clear as is the derivative of $\log(x)$, but I do not see how the first formula is rearranged into ...
2
votes
0
answers
53
views
Is there any wrong in my focal loss derivation?
Assume $\mathbf{X} \in R^{N, C}$ is the input of the softmax $\mathbf{P} \in R^{N, C}$, where $N$ is number of examples and $C$ is number of classes:
$$\mathbf{p}_i = \left[ \frac{e^{x_{ik}}}{\sum_{j=...
2
votes
0
answers
321
views
Is Gradient Descent algorithm a part of Calculus of Variations?
As in https://en.wikipedia.org/wiki/Calculus_of_variations
The calculus of variations is a field of mathematical analysis that
uses variations, which are small changes in functions and ...
5
votes
2
answers
251
views
Which linear algebra book should I read to understand vectorized operations?
I am reading Goodfellow's book about neural networks, but I am stuck in the mathematical calculus of the back-propagation algorithm. I understood the principle, and some Youtube videos explaining this ...
3
votes
2
answers
2k
views
What is a bad local minimum in machine learning?
What is "bad local minima"?
The following papers all mention this expression.
Eliminating all bad Local Minima from Loss Landscapes without even adding an Extra Unit
limination of All Bad Local ...
5
votes
2
answers
629
views
Why is the derivative of this objective function 0 if the policy is deterministic?
In the Berkeley RL class CS294-112 Fa18 9/5/18, they mention the following gradient would be 0 if the policy is deterministic.
$$
\nabla_{\theta} J(\theta)=E_{\tau \sim \pi_{\theta}(\tau)}\left[\left(\...
3
votes
1
answer
493
views
Are my computations of the forward and backward pass of a neural network with one input, hidden and output neurons correct?
I have computed the forward and backward passes of the following simple neural network, with one input, hidden, and output neurons.
Here are my computations of the forward pass.
\begin{align}
net_1 &...
5
votes
1
answer
306
views
Why is the change in cost wrt bias in neural network equal to error in the neuron?
While reading the book on neural networks by Michael Nielson, I had a problem understanding equation (BP3), which is
$$
\frac{\partial C}{\partial b_{j}^{l}}=\delta_{j}^{l} \tag{BP3}\label{BP3},
$$
...