victoresque / pytorch-template

PyTorch deep learning projects made easy.
MIT License
4.75k stars 1.09k forks source link

Bugs in Resume Checkpoint #57

Closed chienyiwang closed 5 years ago

chienyiwang commented 5 years ago

Thanks for the great work on this template. However, in the base_trainer.py, there are two bugs while resuming checkpoints:

  1. line 100: (I think this is related to #54, but you closed the issue without fixing it) While resume training from saved checkpoints, there will be "reference before assignment" error on the not_improved_count variable.
  2. line 165 and 171: The sanity check here is invalid, as the config would be overwritten by the config.json of the saved checkpoint when parsing config (line 22 in parse_config.py)
SunQpark commented 5 years ago

Thank you for reporting these problems, @chienyiwang. I'll start working on this soon.

SunQpark commented 5 years ago

I made PR #58 for this Issue. Could you review the changes @chienyiwang??

chienyiwang commented 5 years ago

Just reviewed. Thanks for the quick fix!