What is early stopping?
Ending training when the loss on held-out data stops improving, and keeping the weights from the best step.
Where it is taught
Train a tiny transformer. Everything in this course runs here at once. Train a real transformer on your own device and learn to read what it shows you.
What the lesson leaves you with
- One training step is: batch, forward pass, loss, backward pass, update.
- The loss starts at , passes the bigram baseline, and keeps falling as attention is put to use.
- Held-out loss is the honest score. When it turns upwards the model is memorising, and early stopping keeps the best weights.
Questions
- What is early stopping?
- Ending training when the loss on held-out data stops improving, and keeping the weights from the best step.
- Where is early stopping used in AI?
- Everything in this course runs here at once. Train a real transformer on your own device and learn to read what it shows you.
- What is the key idea to remember about early stopping?
- One training step is: batch, forward pass, loss, backward pass, update.
- Where can I learn early stopping step by step?
- In the lesson “Train a tiny transformer” in Gradient’s course on the maths behind AI, with interactive diagrams and questions.