An epoch is one complete pass through the entire training dataset. During that pass, every sample is used once to update the model parameters. section 5.4.3
An epoch is not the same as a training iteration or step. A step usually processes one batch through forward and backward passes; multiple batch steps make up one epoch. When the entire dataset is used in each step, one step equals one epoch. section 5.4.3
Epochs organize the training process:
- Set a number of epochs or another stopping criterion before running the training loop. section 5.4.3 section 5.4.4
- Inspect loss and class-specific results across epochs rather than trusting overall accuracy alone. section 13.8
Choosing the number of epochs
A normalized temperature model is trained for 5,000 epochs. Its loss falls from 80.36 initially to about 2.93 by epoch 5,000, while the learned parameters approach the expected Fahrenheit-to-Celsius relationship. The choice of 5,000 is a hyperparameter rather than a universal rule. section 5.4.4
