Quantcast
Channel: What do you mean by "updating based on a training example/batch" in Gradient Descent? - Artificial Intelligence Stack Exchange
Viewing all articles
Browse latest Browse all 2

What do you mean by "updating based on a training example/batch" in Gradient Descent?

$
0
0

My understanding is this: When doing Stochastic Gradient Descent over a neural network, in every epoch, we run $n$ iterations (where the dataset has $n$ training examples) and in every iteration, we take a random sample and update the parameters wrt the sample.

However, in batch gradient descent, we take the whole dataset every epoch, and update the parameters wrt the batch. I have the following questions:

  1. Why do we need to compute the loss function every time, especially if the value of the loss has no importance as such in the backprop process? Is it just to ensure that the loss decreases over time? How can you propagate the error back when the value of L is of no significance?
  2. What exactly does updating wrt a "batch" mean? What would you take the input vector (required to compute gradients for the first set of weights) as? I assume that the loss is taken to be the average of the losses for the entire batch

Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles



Latest Images