An epoch is one complete pass through the available data during training or evaluation. Training epochs update model parameters; testing epochs measure performance without changing weights. section 2.4.2
A practical epoch loop typically:
- Processes batches from a DataLoader and computes model loss. section 2.4.2
- In training mode, backpropagates the loss, updates parameters with an optimizer, and clears gradients. section 1.4 section 2.4.2
- In evaluation mode, records losses, predictions, labels, and scores without optimization. section 2.4.2
Fixed-step optimization
A minimal training schedule might use `for epoch in range(60)`: clear gradients, compute the loss, call `backward()`, and run `optimizer.step()`. The epoch count is a deliberate stopping choice rather than a guarantee of zero loss. section 1.4









