From 2f984c9971fef84a46c09e5b47be290e3bc3d493 Mon Sep 17 00:00:00 2001 From: William Falcon Date: Wed, 14 Aug 2019 09:02:11 -0400 Subject: [PATCH] enable returning only opt list (#114) --- 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 4f58cf7a82..cc3c82f65f 100644 --- a/pytorch_lightning/models/trainer.py +++ b/pytorch_lightning/models/trainer.py @@ -560,7 +560,7 @@ If you're not using SLURM, ignore this message! # CHOOSE OPTIMIZER # allow for lr schedulers as well self.optimizers = model.configure_optimizers() - if len(self.optimizers) == 2: + if len(self.optimizers) == 2 and type(self.optimizers[0]) is list: self.optimizers, self.lr_schedulers = self.optimizers self.__run_pretrain_routine(model)