Skip to content
This repository was archived by the owner on Oct 26, 2022. It is now read-only.

Commit

Permalink
Allow a new maxepoch when resuming from a checkpoint.
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Jones committed Jun 6, 2017
1 parent 501d29c commit 1def963
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions train.lua
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,12 @@ if plpath.isfile(lastStatePath) and not config.nosave then
state.epoch, state.t, state.epoch_t, state.jumped))
end
end

-- Support modifying the maxepoch setting during resume
engine.hooks.onResume = function(state)
state.maxepoch = config.maxepoch
end

engine:resume{
path = lastStatePath,
iterator = corpus.train,
Expand Down

0 comments on commit 1def963

Please sign in to comment.