From the overfitting trap to the validation-loss valley: stop at the best model and generalize better.