I'm using SageMaker for training some custom TF model I realized. During training I naturally evaluate the model multiple times in order to understand when the NN actually starts overfitting. After training I'd like to restore the model that works best (i.e. which presents minimum validation loss) and deploy it on an endpoint. However, if I use the classic Tensorflow.attach() the model that is restored corresponds with the one stored in output/model.tar.gz, which, if I got it correctly, would be the one corresponding with the last training iteration (thus it may overfits).
Is there a way for specifying to SageMaker which checkpoint restoring without necessarily retraining the model with early stopping? Even forcing SM to save in model.tar.gz the model that presents minimum validation loss and not the last one would work for me, unfortunately I didn't find any immediate way to do so...
Thank you!