Epoch

One full pass through the training dataset during model training.

How many updates fit in one epoch?

A fictional archive dataset contains ten distinct records. Training visits each once per pass, uses a batch size of four, retains the final partial batch and makes one optimizer update per batch.

Batch in the first passRecords usedUpdates so far
First41
Second42
Third23

What does a second epoch add?

After two complete passes the model has processed twenty record presentations and made six updates. It has still seen ten distinct source records. Shuffling changes their order, and augmentation can change their appearance, without creating ten new original objects per pass.

Two card files and loose specimen cards sit on an archive desk.
The last batch in a pass can contain fewer records than the others.

When can two “ten-epoch” runs differ?

Changing the batch size changes the number of updates. Dropping a partial batch, accumulating gradients, sampling with replacement or streaming without a fixed dataset can also change what the reported count means. Ask for examples processed and optimizer steps when comparing runs.

Follow the idea

Data Augmentation · See how a repeated source image can yield different training views.

Model Parameters · Identify what the optimizer updates.

Source · Keras model training API

Return to Epoch in the A–Z glossary