0Pricing
Deep Learning Academy · Lesson

An Epoch Loop with Validation

Evaluate after each pass through the data.

What an Epoch Means

One epoch is a single full pass over your entire training set. Real training repeats this pass many times so the model keeps improving.

The Outer Loop

Wrap your whole routine in a loop over epochs. Each turn of this outer loop trains once and then checks progress on validation.

for epoch in range(num_epochs):
    train_one_epoch()
    validate()

All lessons in this course

  1. Split Train, Validation & Test
  2. An Epoch Loop with Validation
  3. Save & Load with state_dict
  4. Early Stopping on Val Loss
← Back to Deep Learning Academy