enable returning only opt list (#114)

This commit is contained in:
William Falcon 2019-08-14 09:02:11 -04:00 committed by GitHub
parent b64e94bae3
commit 2f984c9971
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

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