Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saving and Restoring model, it starts from the same epoch. #97

Open
mmuratarat opened this issue Jul 17, 2018 · 0 comments
Open

Saving and Restoring model, it starts from the same epoch. #97

mmuratarat opened this issue Jul 17, 2018 · 0 comments

Comments

@mmuratarat
Copy link

mmuratarat commented Jul 17, 2018

In 10_save_restore_net.ipynb file, you save the model at each epoch. When you interrupt it with keyboard and starting running again, the model is restored from the epoch where the interruption occurred and it computes the loss (predictions in your case) at that epoch once again. For example,
Model runs until epoch 2 and then I interrupt it:

Start from: 0
0 0.9374
1 0.9634
2 0.9697

After I re-run it,
./ckpt_dir/model.ckpt-2
INFO:tensorflow:Restoring parameters from ./ckpt_dir/model.ckpt-2
Start from: 2
2 0.9742
3 0.9747
4 0.9774
5 0.9768
6 0.9783
7 0.9786
8 0.9785
.....

It is computing the loss (predictions in your case) for the epoch 2 once again.

How correct is that?

Can I do start = global_step.eval() + 1?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant