Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug in loading the final train phase checkpoint (#387)
Summary: Pull Request resolved: #387 Setting a checkpoint called `task._set_model_train_mode()` if the checkpoint was a train phase checkpoint. This function used to call `self.optimizer.update_schedule_on_epoch`, which called `self.where`. This would raise an exception for the final checkpoint since the value of where would be 1.0. Moved this call to `advance_phase()`, that is anyway a better place for the update schedule to be called instead of inside `_set_model_train_mode()`. Added a test case which failed before the fix and passes now. Reviewed By: vreis Differential Revision: D19815391 fbshipit-source-id: 05b51a0e76d20c7009e93fff4d01a6fdfb14e2cc
- Loading branch information
1 parent
8a690af
commit bbfc3ae
Showing
3 changed files
with
45 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters