From a3df994d5f57bc21e0335fcb66955ff66ac5b5ba Mon Sep 17 00:00:00 2001 From: williamFalcon Date: Sun, 28 Jul 2019 06:34:55 -0700 Subject: [PATCH] allow optimizer fx to return 1 or 2 lists --- pytorch_lightning/testing_models/lm_test_module.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pytorch_lightning/testing_models/lm_test_module.py b/pytorch_lightning/testing_models/lm_test_module.py index a143e51e7e..87de2c7777 100644 --- a/pytorch_lightning/testing_models/lm_test_module.py +++ b/pytorch_lightning/testing_models/lm_test_module.py @@ -181,7 +181,9 @@ class LightningTestModel(LightningModule): """ # try no scheduler for this model (testing purposes) optimizer = optim.Adam(self.parameters(), lr=self.hparams.learning_rate) - return [optimizer], [] + + # test returning only 1 list instead of 2 + return [optimizer] def __dataloader(self, train): # init data generators