From a2639c6894795413b9e6a2ee3fcfd26ef76c2ee9 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 add8e30c..d7681626 100644 --- a/pytorch_lightning/models/trainer.py +++ b/pytorch_lightning/models/trainer.py @@ -599,7 +599,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)