AI Glossary

Epoch

An epoch is one pass through the training dataset under a defined training loop. In streaming or repeated-sampling setups, an epoch may instead be a configured number of steps, so the counting convention must be stated.

· Updated · Chain of Thought

Model Training

With 10,000 examples and batches of 100, one ordinary pass without replacement contains 100 batches. If the optimizer updates once per batch, that is 100 updates per epoch. Gradient accumulation can combine several batches before an update, changing the update count without changing how many examples were processed.

Multiple epochs repeat the pass, often with a new ordering of examples. Keras also lets a training loop specify steps per epoch for data whose full size is not known. That convention is useful for streams, but it differs from claiming that every distinct example was seen once.

The unit matters when comparing training logs. Ten epochs over a small collection are different work from ten over a much larger one. Report dataset size, batch size, sampling and update conventions alongside epoch count. More passes can improve fit or increase overfitting; validation results, not a target count alone, determine when training is useful.

Sources

  • Keras: Model training APIs — Defines epochs and steps_per_epoch, including a configured step count for infinite input datasets.

Go deeper