Epoch vs Batch Size
People often think an epoch is one training step. It is a full pass over all the data. Batch size is how many examples go into one step. So with 1,000 examples and a batch size of 100, one epoch takes 10 steps.
Epoch
One full pass through all the training data. Training runs many of them.
An epoch is one full pass through all of the training data. If you have 10,000 examples, one epoch is done when the model has seen all 10,000 once. Training usually runs for many epochs, so the model sees each example many times. Each pass, it learns a little more. With too many epochs, it starts to memorise the data.
Batch Size
How many examples the model reads before each update. Often 32 or 64.
Batch size is how many examples a model looks at before it updates its weights. Training does not use all the data at once. It splits the data into small groups called batches, often 32 or 64 examples each. After each batch, the weights take one step. Bigger batches use more memory, and smaller ones give noisier steps.
In one line
- Epoch
- One full pass through all the training data. Training runs many of them.
- Batch Size
- How many examples the model reads before each update. Often 32 or 64.