Visual explainer
Early Stopping
Why you shouldn't train for a fixed number of epochs, and how to reliably stop when the model actually reaches its best performance.
You train 30 fixed epochs and watch held-out loss dip then climb. It bottoms at 0.31 near epoch 12 and ends at 0.58, so your final weights are your worst.
Track The Best
You check validation each epoch and keep three notes. Best score so far, weights that made it, and epochs since it moved, then you save when you beat it.
Wait Through Noise
You do not stop on one bad epoch because batches wobble. With patience 5 you train to epoch 17, see 0.31 rise to 0.42, and trust the turn is real.
Restore, Do Not Keep
You stop at 17 but your best lived at 12. If you keep the last weights you ship higher loss, so you reload the saved 0.31 checkpoint before you test.
Restored Beats Final
You score both on the same held-out set. Final gives 0.58, restored gives 0.31, a 0.27 gap from one reload, with no extra training cost at all.
Pick Your Patience
You start with patience 5 to 10 and watch when you stop. If you halt in the first few epochs while loss still falls, you'll raise it and run again.
Where It Breaks
You set patience 1 and a noisy batch ends you at epoch 7. Loss would have kept falling to 0.31, but you quit early and keep weaker weights.
The Quick Version
- Thirty epochs end at 0.58, not best.
- Save weights on each new best score.
- Patience 5 rides out single bad epochs.
- Reload epoch 12, do not keep last.
- Restored 0.31 beats final by 0.27.
- Raise patience when you stop too early.
- Patience 1 quits on noise at epoch 7.