I’m not @ptrblck but if you’re willing to also hear form someone else:
If you think of this as an optimization problem, you might think about what metric you want to optimize. I guess the more common criterion is the accuracy (which we cannot use in training because it is not differentiable).
Note that you would need a test set to measure the resulting accuracy is (because using early stopping means you now used the validation set in training).