From 52a98d76d886d55863e0359e165d48f76c894e83 Mon Sep 17 00:00:00 2001 From: William Falcon Date: Sat, 13 Jul 2019 10:16:50 -0400 Subject: [PATCH] added fallback local init --- pytorch_lightning/models/trainer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytorch_lightning/models/trainer.py b/pytorch_lightning/models/trainer.py index 8fc4d5ee..b27996a7 100644 --- a/pytorch_lightning/models/trainer.py +++ b/pytorch_lightning/models/trainer.py @@ -597,7 +597,7 @@ class Trainer(TrainerIO): try: loss = output['loss'] except Exception as e: - if type(loss) is torch.Tensor: + if type(output) is torch.Tensor: loss = output self.__add_tqdm_metrics(model_specific_tqdm_metrics_dic)