Epoch Vs Iteration in CNN training

There are a few discussions for Epoch Vs Iteration.

Iteration is one time processing for forward and backward for a batch of images (say one batch is defined as 16, then 16 images are processed in one iteration).

Epoch is once all images are processed one time individually of forward and backward to the network, then that is one epoch.

I like to make sure my definition of epoch is correct.

One epoch is counted when (Number of iterations * batch size) / total number of images in training

One epoch is counted when Number of iterations == total number of images in training

Which one is correct epoch? My selection is the first one.

Answer

One iteration means one batch processed.
One epoch means all data processed one times.

So one epoch is counted when (batch_size * number_iteration) >= number_data

Attribution
Source : Link , Question Author : batuman , Answer Author : alexandre_d

Leave a Comment