victoresque / pytorch-template

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

Add early_stop option, use print instead of summary. #34

Closed SunQpark closed 5 years ago

SunQpark commented 5 years ago
  1. early_stop is added as suggested in #32. This feature can be set in the early_stop option in config.json.

  2. BaseModel class now override __str__ function, instead of defining additional summary method to make it printed with number of params. This change replace model.summary() with print(model) in the train.py, making it does not crash when user does not inherit BaseModel and use nn.Module.

  3. Changing config file layout on monitor option. Previously monitor mode and metric is set with two distinct options like "monitor_mode = "min", monitor_metric = "val_loss". The same option for current layout is "monitor" = "min val_loss" now.

SunQpark commented 5 years ago

Corrected that line, thank you @victoresque.