diff --git a/pytorch_lightning/models/trainer.py b/pytorch_lightning/models/trainer.py index 7c45f35a..3b129d78 100644 --- a/pytorch_lightning/models/trainer.py +++ b/pytorch_lightning/models/trainer.py @@ -150,6 +150,9 @@ class Trainer(TrainerIO): self.use_ddp = False self.use_dp = False + # bookkeeping + self.avg_loss = 0 + # gpus come in as a string. # if gpus = -1 then use all available devices diff --git a/tests/test_models.py b/tests/test_models.py index e0b0a36e..6bac63cf 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -227,7 +227,6 @@ def test_amp_gpu_dp(): experiment=get_exp(), max_nb_epochs=1, train_percent_check=0.4, - val_percent_check=0.4, gpus=[0, 1], distributed_backend='dp', use_amp=True