What is an epoch in machine learning?

0

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:
https://gist.github.com/craine/e9c37f6fa9bfe00c84a9374026d97e54

LEAVE A REPLY

Please enter your comment!
Please enter your name here