I have been tring to understand the concept of epoch and batch size. You can see training resulf of my CNN in the below:
Epoch 160/170
32/32 [==============================] - 90s 3s/step - loss: 0.5461 - accuracy: 0.8200 - val_loss: 0.6561 - val_accuracy: 0.7882
Epoch 161/170
32/32 [==============================] - 92s 3s/step - loss: 0.5057 - accuracy: 0.8356 - val_loss: 0.62020 - val_accuracy: 0.7882
Epoch 162/170
32/32 [==============================] - 90s 3s/step - loss: 0.5178 - accuracy: 0.8521 - val_loss: 0.6652 - val_accuracy: 0.7774
Epoch 163/170
32/32 [==============================] - 94s 3s/step - loss: 0.5377 - accuracy: 0.8418 - val_loss: 0.6733 - val_accuracy: 0.7822
So there are 163 epoches with 32 batch size. Since batch size is number of samples for each epoch, there has be 163*32 = 5216 samples but there only 3459 samples in the dataset. So does it start to take image from the beginning of the dataset when they are not enoght?