What is an epoch in machine learning?


An epoch is one pass through an entire dataset. This can be in random order. You an also batch your epoch so that you only pass through a portion at a time.

An example: If you have 100 images in your train set then one full pass through your training model on all the examples in the train set is an epoch.

If your batch size is 20, your model will be presented with 5 batches each containing 20 images during a single epoch of training.

If you have 100 images and you pass through 10 epochs you run through those 100 images 10 times.

An example is from Deepweeds project where you’ll see numerous epochs. The reason we run multiple epochs is to try and increase accuracy as the model learns more about the images and gathers data through each epoch.

Run through the code below and view the epochs and how they increase accuracy:

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

view raw
hosted with ❤ by GitHub


Please enter your comment!
Please enter your name here