Early stopping - Do I get the best model or the latest model?

If the fitting of my neural network ends early because of early stopping, does Pytorch return the best model or the latest model fitted?

Usually you would stop the training and restore the “best” model, but it depends how you’ve implemented the early stopping.
Could you share the code you are using, so that we could have a look? :slight_smile: