1 / 13
THE SCENARIO

One Step Should Not Take an Hour

You are training a model to recognise photos of cats. Your dataset has one million photos.

Plain gradient descent, exactly as you learned it, does this:

  1. Look at all one million photos.
  2. Work out the average loss.
  3. Compute the gradient.
  4. Take one small step downhill.

That is one step. To reach the minimum you may need thousands of steps.

The maths is perfect. The waiting is unbearable. This lesson is about fixing the waiting.

One million photos processed for a single downhill step.

One million photos processed for a single downhill step.