Closed chingheng113 closed 3 years ago
Hi, In the example notebook on the front page 01_introduction.ipynb, we use an EarlyStopping callback that does something like this. As stated in the notebook right above cell 21:
"After termination, the EarlyStopping callback loads the best performing model (in terms of validation loss)."
Alternatively, you can use torchtuples.callbacks.BestWeights
(code here) which works the same way as EarlyStopping, just without a stopping criteria.
Does this answer your question?
Yes! Thank you!
Hi, According to this closed issue(https://github.com/havakv/pycox/issues/29), I am able to save the final model after taining. My question is how to save the best model during training (like a callback mechanism), is there any examples? Thank you,