To choose the right number of iterations or number of epochs for our training step, the metric we should have our eyes on is the validation error. The intuitive manual way is to have the model train for as many epochs or iterations that it takes, as long as the validation error keeps decreasing. Luckily however, we can use a technique called Early Stopping to determine when to stop training a model. Early stopping roughly works by monitoring the validation error and stopping the training when it stops decreasing. You must be a little flexible though in defining the stopping trigger. Validation error will often move back and forth even if it’s on a downward trend. So instead of stopping the training the first time we see the validation error increase, we can instead stop the training if the validation error has not improved in the last 10 or 20 steps. TensorFlow has support for early stopping. Check the text below the video for how to implement it in TensorFlow.