victoresque / pytorch-template

PyTorch deep learning projects made easy.
MIT License
4.7k stars 1.08k forks source link

i face error when resume training. #54

Closed EzoBear closed 5 years ago

EzoBear commented 5 years ago

i face error when resume training. Screenshot from 2019-05-31 15-32-07

Screenshot from 2019-05-31 15-31-27

in line 99 of base trainer, not_improved_count += 1 when i resume training, my code into else partition. so occured error because this variable is not initialized but perform plus operation itself+1.

so i propose to initialize variable before where into if partition.