The learning loop

Step a line through predict, measure, find the direction, and update, and watch training and test loss fall.

BeginnerExplained in The learning loop

The learning loop

A model (the line) improves by repeating four steps. Step through one round at a time, or let it run.

  1. 1PredictUse the current line to guess y for every training x.
  2. 2Measure the lossAverage the squared misses into one number.
  3. 3Find the directionWork out which way to nudge w and b to lower the loss.
  4. 4UpdateMove w and b a small step that way. Repeat.
  • Training points (used to learn)
  • Test points (held back)
  • Current line

The line starts out wrong. Press Next step to begin the first round.

0.50

How far each update moves w and b.

Round0
Training loss0.1007
Test loss0.0858
Slope w-0.5
Intercept b0.85

Try this

  • Step through one full round with Next step and read each note.
  • Run with a small step size, then with the largest. Compare the loss curves.

Try "embedding", "softmax", "overfitting", or "backpropagation".