I am using the new API SavedModelsince I found out that this is the “future” and should be preferred tf.train.Saver().
What I'm trying to accomplish is to save the model in each Nnumber of batches, and I want to save a maximum of 20 saved models. Obviously, I can control this on my own, but if I tf.train.Saver()can achieve this, I believe that a similar way can be done with SavedModel. I would also like to be able to explicitly save the model whenever I want, and that they all be called as model-001, model-002....
All this was possible with the help tf.train.Saver()- I could define max_to_keepand global_stepto save every era or so, and I could save when I want.
Is this possible using the API SavedModel? If so, how? An example will be appreciated.
It is reasonable to assume that it signature def mapwill be equal to all models.
source
share