MathGaron / pytorch_toolbox

Boiler plate code for pytorch. Train/Validation loops, visualization etc. For research.
MIT License
10 stars 3 forks source link

Non-intuitive handling of flag load_best_checkpoint in train.py #9

Closed weberhen closed 7 years ago

weberhen commented 7 years ago

I still dont like to set load_best_checkpoint to false everytime I need to train a new model from scratch and then set it to true once I run it one time. If I run a second time and I forgot to set load_best_checkpoint to true, it will overwrite my previous best model since it does not know the score of the previous training.

MathGaron commented 7 years ago

As we discussed : lets make a flag that explicitly say train from scracth. train_from_scratch = True : never load the data train_from_scratch = False : check if we can load, if not initialize network, else load