Concept library/Optimization
07
7 minute interactive lab

Gradient descent

Which way should every weight move?

YOU’LL LEAVE KNOWINGTraining is repeated, local improvement of the weights.
THE EXPERIMENT

Find the bottom without seeing the map.

Move the controls. Watch the internal state respond. The explanation follows the behavior—not the other way around.

Runs the real small-scale equationThe displayed values are calculated from the formula shown in this lesson.
OPTIMIZERWalk downhill

This step size makes useful progress without much overshoot.

w = 3.80
minimum loss
current loss7.840
THE MENTAL MODEL

Training is repeated, local improvement of the weights.

The gradient is the local slope of the loss. It tells the optimizer which direction increases error, so the weight moves the other way. The learning rate controls how far it trusts that local clue.

IN DEVELOPER TERMSweight -= learning_rate × gradient
GO DEEPER

Check the model against the source.

Connectionism optimizes for intuition, then points you to the rigorous treatment.

  1. Dive into Deep LearningMinibatch stochastic gradient descent
  2. DistillWhy Momentum Really Works
NEXT CONNECTION

Who gets blamed for a wrong answer?

Backpropagation

Continue to lab 08