Skip to content

Conversation

ChrisCummins
Copy link
Collaborator

Using -reset_iterations 0 when initialising training from a checkpoint made before commit 6990602 causes an error, as reported in issue #82. This patch adds a backwards compatibility fix.

For checkpoint files which do not contain the iteration counter, a warning is printed on checkpoint load and training continues as if not flag was given:

$ th train.lua $OPTIONS -init_from cv/checkpoint_10.t7 -reset_iterations 0
Running in CPU mode
Initializing from   cv/checkpoint_10.t7
reset_iterations: cv/checkpoint_10.t7 contains no iteration counter
Epoch 1.00 / 50, i = 1 / 17800, loss = 3.474951
Epoch 1.01 / 50, i = 2 / 17800, loss = 3.344084
...

The behaviour for checkpoints which do contain an iteration counter is unaffected.

Using `-reset_iterations 0` when initialising training from a checkpoint
made before commit 6990602 causes an
error, as reported in issue jcjohnson#82. This patch adds a backwards
compatibility fix.

For checkpoint files which do not contain the iteration counter, a
warning is printed on checkpoint load and training continues as if not
flag was given:

    $ th train.lua $OPTIONS -init_from cv/checkpoint_10.t7 -reset_iterations 0
    Running in CPU mode
    Initializing from 	cv/checkpoint_10.t7
    reset_iterations: cv/checkpoint_10.t7 contains no iteration counter
    Epoch 1.00 / 50, i = 1 / 17800, loss = 3.474951
    Epoch 1.01 / 50, i = 2 / 17800, loss = 3.344084
    ...

The behaviour for checkpoints which do contain an iteration counter is
unaffected.
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

Successfully merging this pull request may close these issues.

1 participant