diff --git a/pl_examples/basic_examples/lightning_module_template.py b/pl_examples/basic_examples/lightning_module_template.py index f773fc81a3..6b58ab46ef 100644 --- a/pl_examples/basic_examples/lightning_module_template.py +++ b/pl_examples/basic_examples/lightning_module_template.py @@ -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