You can save the state of your model regularly during training, in different files, so at the end you can choose which one to use, by looking at your losses plot.
To get the best results on data that is not in the training set, you’d want to use the model state saved at the lowest validation loss (just before the over-fitting starts to increase validation loss).