Save / Load Hyperparameters with checkpoint (#415)

* Save and load hparams from checkpoints

* Update docs

* Add warning when not saving hparams

* Missing import

* Update .run_local_tests.sh

* Update lm_test_module_mixins.py

* Update lightning_module_template.py
This commit is contained in:
Nic Eggert authored and William Falcon committed 2019-10-23 04:48:24 -04:00
1 parent 0db422777c
commit 05cea3ff8b
7 files changed
+104 -6

No files matched your search

@@ -158,7 +158,7 @@ class LightningTemplateModel(LightningModule):
val_loss = output['val_loss']
# reduce manually when using dp
if self.trainer.use_dp:
if self.trainer.use_dp or self.trainer.use_ddp2:
val_loss = torch.mean(val_loss)
val_loss_mean += val_loss