mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-10-30 13:40:46 +08:00
Merge branch 'hparams_from_checkpoint' of https://github.com/neggert/pytorch-lightning
This commit is contained in:
commit
3fcce57e6f
1 file changed
+1
-1
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user