Review — Training loop
Back to the lesson · Learning path plan
What to remember
- On a batch, the forward pass predicts, the loss compares predictions with targets, the backward pass computes gradients and the optimizer updates parameters.
- Teacher forcing uses observed tokens in training prefixes. During generation, the loop feeds back tokens it has selected.
- Validation measures the model on data held out from parameter updates. Falling training loss with sustained deterioration in validation warrants investigation.
- Validation can guide checkpoint selection or hyperparameter tuning. The final test set is reserved for evaluating the selected model.
Recall from memory
After computing the loss on a validation pass, should you call the optimizer?
Show the answer
No. The pass measures the current parameters without fitting them on validation data.
Compare two checkpoints when validation batches contain different numbers of valid targets.