Skip to content

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

Description

@mmuratarat

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions