Definition
An epoch is one nominal pass through the training dataset. If a dataset has N examples and the effective batch size is B, an epoch usually contains about N divided by B optimizer steps, with the final partial batch either kept or dropped. Training commonly reshuffles examples before the next epoch.
The definition becomes less literal when examples are sampled with replacement, generated during training, filtered dynamically, repeated with weights, or streamed without a fixed end. In those systems, an epoch is a configured amount of work rather than proof that every distinct example appeared exactly once. Distributed samplers also need a shared convention so workers do not silently duplicate or omit data.
Epoch count is a progress measure, not a quality measure. More epochs expose the model to more training opportunities, but repeated fitting can increase overfitting. Comparing "ten epochs" across runs is meaningless unless the dataset, batch rules, accumulation, and sampling policy are comparable.
Distinguish it from nearby terms
A training step usually ends in one optimizer update. A batch is the data used for a gradient estimate. An epoch groups enough batches to cover the dataset under the run's sampling convention.
Check your understanding
A dataset has 1,025 examples and a batch size of 128. How many batches make an epoch when the last partial batch is kept? How does the answer change when it is dropped?