Reputation: 43
I am using tensorflow to train a RNN with more than 200k of data , the training process takes up to 2 hours for every epoch. I save the model for every epoch with custom callback and this function:
model.save_weights()
can I stop the training and resume it later from last epoch like this? Does it make a diffrence in the result?
model.load_wieghts(last_epoch_dir)
model.fit()
Upvotes: 0
Views: 86
Reputation: 156
Yes, you can retrain from the last epoch but the problem is that you might loose your optimiser state but it’s no problem because optimiser will go back to its original state or even better within a few epochs.
Upvotes: 2