Reputation: 183
I'm training a model (a generative adversarial network) over an input-set using Tensorflow, and I would like to save model's parameters every 50 epochs.
Let say that I want to train the model for 1000 epochs, and save the model's parameters every 50 epoch, which would end up having 20 different checkpoint files.
By having a Session, and a Saver object, I simply use the following code to do so.
if num_epoch % 50 == 0:
saver.save(sess=sess, path='RGAN-1/sv/' + type_exp, global_step=num_epoch)
The problem is, that checkpoints are getting overwritten, and at the end of the experiment, I only have the last 6 checkpoints, while I should have 20 checkpoints.
I have no idea why this is happening.
Upvotes: 0
Views: 621