Typically you would select the epoch at which either the best validation loss occurred or when the model has converged. There’s no “has to”, but we do generally use the validation set to determine which model is best.