Questions tagged [gradient-descent]

Gradient Descent is an algorithm for finding the minimum of a function. It iteratively calculates partial derivatives (gradients) of the function and descends in steps proportional to those partial derivatives. One major application of Gradient Descent is fitting a parameterized model to a set of data: the function to be minimized is an error function for the model.

Filter by
Sorted by
Tagged with
0
votes
0answers
6 views

Method for Finding All Local Extrema Using Gradent Ascent/Descent

I have a very abstract model where a set of coefficients controls animal behavior. This model is so abstract that the actual values of a global extrema are not particularly interesting. However, the ...
1
vote
2answers
18 views

Why does using Gradient descent over Stochatic gradient descent improve performance?

Currently, I'm running two types of logistic regression. logistic regression with SGD logistic regression with GD implemented as follows ...
0
votes
0answers
9 views

Getting gradient for gradCam in pytorch

I am using forward and backward hook in my pytorch densenet121 model. I set requires_grad to False at the time of training. ...
0
votes
0answers
5 views

what would happen in max_pool layer if backprop would add gradient to all inputs for particular neuron but only if it's positive

in max_pool layer ANN performs this operation max([in1, in2, ... inN]), now if gradient that comes back to this layer is ...
0
votes
1answer
20 views

Is the usage of the “momentum” significiantly superior to the conventional weight update

The "momentum" adds a little of the history of the last weight updates to the actual update, with diminishing weight history (older momentum shares get smaller). Is it significiantly ...
0
votes
0answers
13 views

Gradient Descentfor non-linear predictor?

From I what I have read so far, if a loss function $\mathcal{l}(y,\hat{y})$ is convex where $\hat{y}$ is the (to be estimated) decision function, then gradient descent tries to minimizes the loss ...
0
votes
0answers
5 views

Gradient calculation of the pre-trained model

I have pre-trained tensorflow model in a graph format. I have not used tf.gradient on the graph structure. In such cases, is there any way to calculate the gradient of some tensors operation?
1
vote
1answer
13 views

Why do neural networks use cost minimization of loss function and not profit maximization of profit function?

In neural networks, gradient descent is used to find optimum minimum value of cost function. Why this preference instead of finding maximum value of profit function? What are the pros and cons of ...
0
votes
0answers
14 views

Theano error when performing Linear Regression

I'm trying to perform Linear Regression using Theano, but there is something I might be missing or doing wrong because I receive an error message, here you have a reproducible example: ...
1
vote
1answer
34 views

What method/algorithm for constrained multi-target regression

I am working with three dimensional measurement data and want to model them using a multivariate linear regression. I have already implemented a simple gradient descent algorithm to solve the classic ...
1
vote
1answer
26 views

What issue is there, when training this network with gradient descent? [closed]

Suppose we have the following fully connected network made of perceptrons with a sign function as the activation unit, what issue arises, when trying to train this network with gradient descent?
0
votes
1answer
18 views

Vanishing gradient problem

In a neural network, does gradient vanish during a great number epochs as well, rather that only vanishing through different layers?
0
votes
1answer
23 views

Why is backpropagation used for finding the loss gradient?

I am relatively new to the world of machine learning. After getting a general idea of the concept, I tried creating a program for training a deep learning network from scratch. My goal was to use as ...
0
votes
1answer
17 views

How do i get the loss function graph?

I used Mini-batch gradient descent to train the model, but i am unable to get the proper loss graph. The loss graph is always showed as a straight line. I know there is something wrong but would ...
0
votes
1answer
22 views

Gradient descent around optimal loss surface

All the loss surface used in examples have some of bowl shape that decrease drastically far from the optimal and decrease slowly around the optimal flat point. My questions are: Has all the loss ...
0
votes
0answers
11 views

Learning Rule fo bias weights

Consider the network : The learning rule (weight update )used for the hidden-to-output weights is: The learning rule (weight update )used for the input-to-hidden weights is: So what about the bias ...
0
votes
1answer
25 views

How does the equation “dW = - (2 * (X^T ).dot(Y - Y_hat)) / m” comes in Linear Regression (using Matrix + Gradient Descent)?

I was trying to code the Linear Regression in Python using Matrix Multiplication method using Gradient Descent and followed a code where there was no mention what is the loss but just a code as Per ...
0
votes
0answers
9 views

When to use Gradient boosting over stochastic gradient boosting

Gradient boosting works on the Gradient Descent concept and it's one of the ensemble methods. It has a regularization parameter to select subsamples, which is called stochastic gradient boosting. ...
2
votes
1answer
38 views

Adam Optimiser First Step

Plotting the paths on the cost surface from different gradient descent optimisers on a toy example, I found that the Adam algorithm does not initially travel in the direction of steepest gradient (...
1
vote
1answer
33 views

Derivative of a custom loss function with the logistic function

I have costum loss function with $\mu ,p, o, u, v$ as variables and $\sigma$ is the logistic function. I need to derive this loss function. Due to multiple variables in the loss function, I need to ...
1
vote
0answers
13 views

Can we talk about vanishing activations?

When updating the weights of a deep neural network using backpropagation, to update the weights of a given hidden layer, we use both the partial derivatives of the objective function with respect to ...
0
votes
1answer
23 views

Why are mini-batches degrading my conv net MNIST classifier?

I have made a convolutional neural network from scratch in python to classify the MNIST handwritten digits (centralized). It is composed of a single convolutional network with 8 3x3 kernels, a 2x2 ...
0
votes
0answers
15 views

When should I update weights and biases in Neural Network?

So, I am building a Neural Network from scratch for (typically) classifying MNIST digits. Everything is going fine, I can get up to 85% accuracy accross all testing data with stochastic gradient ...
0
votes
0answers
17 views

Unbiased Predictions for all Distinct Training Subsets

Suppose I have a data set $\left(X_i \in \chi, y_i \in \zeta \right)$ where $X_i$ and $y_i$ correspond to instances and labels, and $\chi$ and $\zeta$ correspond to the space where $X_i$ and $y_i$ ...
6
votes
1answer
247 views

Changing the batch size during training

The choice of batch size is in some sense the measure of stochasticity : On one hand, smaller batch sizes make the gradient descent more stochastic, the SGD can deviate significantly from the exact ...
3
votes
3answers
627 views

Why a sign of gradient (plus or minus) is not enough for finding a steepest ascend?

Consider a simple 1-D function $y = x^2$ to find a maximum with the gradient ascent method. If we start in point 3 on x-axis: $$ \frac{\partial f}{\partial x} \...
1
vote
0answers
21 views

Dying gradient issue in Graph Neural Networks

I am using Pytorch-Geometric library to implement a Graph Convolutional Layer(GCN) followed by few linear layers for a prediction task. But after training on graphs with np. of nodes being 10K and no. ...
0
votes
1answer
18 views

Neural Network Optimization steps order

I have a very basic question on the optimization algotithm, when I'm adjusting weights and biases in a NN, should I: Forward propagate and backpropagate to calculate gradient descent (DC) for each ...
1
vote
0answers
65 views

OLS and gradient descent difference?

I am doing a course on Udemy on which the instructor applied OLS (Ordinary least square) on a housing dataset. The curve he got was linear,with parameters [10^5,239]. Now When I tried to repeat the ...
3
votes
1answer
54 views

what is difference between Logistic regression and SGDClassifier with log loss OR SVM and SGDClassifer with hinge loss?

Can we just use SGDClassifier with log loss instead of Logistic regression, would they have similar results ?
1
vote
1answer
43 views

Do zero weights receive zero gradient in ReLU neural networks?

Suppose I have a deep neural network using the ReLU activation function, that is $\sigma(x) = max(x, 0)$. Suppose some weight $w_i$ becomes exactly $0$ at some point. Am I getting something wrong here,...
1
vote
0answers
6 views

Error term in probabilistic interpretation of least squares update rule

I have read in Stanford's CS229 course notes that to justify the least-squares update rule with probability, the following is assumed: $$y^{(i)} = \theta^Tx^{(i)}+\epsilon^{(i)}$$ , where $\epsilon^{(...
0
votes
0answers
21 views

Why is this equation converted to matrix form in this way? Is it possible to multiply an inverse matrix with a vector?

I have been banging my head on wall for days trying to decode this equation. please help me out with this... Below is the equation (consider $x$ as $\Delta x$, and $y$ as $\Delta y$): $x = - \eta(Id-\...
0
votes
0answers
12 views

How to interpret gradient descent in boosting ensembles?

I struggle to grasp the role of gradient based optimization in boosting ensembles. As far as I understand boosting means combining a bunch of estimators (of the same types, usually decision trees) ...
0
votes
0answers
31 views

Multivariable linear gradient descent resulting in inf

I am trying to implement a multivariable gradient descent algorithm, it seems to start working fine, and works on smaller datasets, but applying it to larger datasets the variables overflow and cause ...
-1
votes
3answers
44 views

Gradient descent does not converge in some runs and converges in other runs in the following simple Keras network

When training a simple Keras NN (1 input, 1 level with 1 unit for a regression task) during some runs I get big constant loss that does not change in 80 batches. During other runs it decreases. What ...
0
votes
2answers
43 views

Why use gradient descent on Deep Nets / RNNs when cost function is not convex?

Why do we use gradient descent on very non-convex loss functions such as in Deep nets / RNNs rather than a heuristic search (genetic algorithms, simulated annealing, etc)?
5
votes
2answers
751 views

Getting NN weights for every batch / epoch from Keras model

I am trying to get weights for every batch / epoch from Keras model after it is trained. To do so I use callback to make model save weights during training. Yet after model is trained it looks like I ...
1
vote
0answers
30 views

SVM with gradient descent

The constrained optimization problem in SVM is given by min 1/2 ||w||^2 s.t y(i)(w^T x(i) + b >= 1 for all i Now converting this to an unconstrained optimization problem gives the lagriangian L as ...
3
votes
2answers
172 views

How does the descending gradient know what weights to adjust?

I was reading about descending gradient. How does the descending gradient know what weights to adjust? Does it adjust to all network weights at the same time? Does each weight have an associated error?...
2
votes
3answers
83 views

Neural Network Loss Function - Mean Square Error: questions about what 'n' signifies

I'm very new to neural networks and have recently learnt about the loss functions used with neural networks. This question is in regards to the mean square error metric, defined as (from the textbook ...
1
vote
1answer
31 views

Maximum Likelihood with Gradient Descent or Coordinate Descent blows up

Context The maximum likelihood estimators for a Normal distribution with unknown mean and unknown variance are $$ \widehat{\mu} = \frac{1}{n}\sum_{i=1}^n x_i \qquad \text{and} \qquad \widehat{\sigma}^...
1
vote
1answer
42 views

Why standard distribution for ML [closed]

Data normalization: It ensures that each input (each pixel value, in this case) comes from a standard distribution. This standardization makes our model train and reach a minimum error, faster! my ...
3
votes
0answers
96 views

Why the sigmoid activation function results in sub-optimal gradient descent?

I need some help understanding the second shortcoming of the sigmoid activation function as described in this video from Stanford. She says that because the output of sigmoid is always positive, that ...
1
vote
0answers
78 views

How are batch gradients computed on embedding layers?

Consider the following model, which is more or less a 12-dimensional vector lookup table with 10 rows, initialized to all zeros. ...
1
vote
1answer
32 views

How to decide if gradients are vanishing?

I am trying to debug a neural network. I am seeing gradients close to zero. How can I decide whether these gradients are vanishing or not? Is there some threshold to decide on vanishing gradient by ...
5
votes
3answers
5k views

What is momentum in neural network?

While using "Two class neural network" in Azure ML, I encountered "Momentum" property. As per documentation, which is not clear, it says For The momentum, type a value to apply ...
1
vote
1answer
66 views

Why don't we find the analytical function of the cost function?

Then we could derive it and find minimum(s). e.g. in small networks the cost function has not so many variables.
1
vote
0answers
123 views

Backpropagation Mathematics with Sigmoid Output Activation and Cross Entropy Loss

I am deriving a Weight update for a simple toy network with a Sigmoid Output Layer. I need some help double checking my math to make sure I did it correctly. I am using Cross-Entropy Loss as my Loss ...

1
2 3 4 5
8