'Epoch, batch size, iterations
I am really confused with the usage of epoch, batch size and iterations. I will drop an example here and perhaps anyone can comment if it is the right way or not.
Suppose I am implementing the training of a model for segmentation, and I have 300 images. Here are two situations that I will speak of
**Situation 1:**
Epoch = 500
Batch size = 4
Iterations = None
300/4 = 75 batches [thus for 1 epoch there will be 75 batches, where each batch will have 4 images] Images used for the entire training = 500 epochs x 75 batches = 37500 batches As each batch will have 4 images, thus 37500 x 4 = 150,000 images used to complete 500 epochs of training
**Situation 2**
Epoch = 500
Batch size = 4
Iterations = 100
100 iterations = 100 batches / epoch [Iterations is defined as the number of batches per epoch] Full training = 500 epochs x 100 batches/epoch = 50,000 batches Images used for full training = 50,000 x 4 = 200,000 images
With this being said, will the two situations differ in the amount of time required to complete 1 epoch? Also, in the Keras documentation, what is depicted by this number of 135 during the training process?
135/135 [==============================]
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
