allow optimizer fx to return 1 or 2 lists

This commit is contained in:
williamFalcon 2019-07-28 06:34:55 -07:00
parent 638d79a5a6
commit a3df994d5f
1 changed files with 3 additions and 1 deletions

View File

@ -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