From 276c24bdc4817f2817b47b7a3a6bcfd9bb47b2ef Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Mon, 30 Aug 2021 23:01:00 +0200 Subject: Bug fix when loading no lr scheduler --- text_recognizer/models/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'text_recognizer') diff --git a/text_recognizer/models/base.py b/text_recognizer/models/base.py index 56d4ca5..57d319e 100644 --- a/text_recognizer/models/base.py +++ b/text_recognizer/models/base.py @@ -63,7 +63,7 @@ class BaseLitModel(LightningModule): self, optimizers: List[Type[torch.optim.Optimizer]] ) -> List[Dict[str, Any]]: """Configures the lr scheduler.""" - if None in self.lr_scheduler_configs: + if self.lr_scheduler_configs is None: return [] schedulers = [] for optimizer, lr_scheduler_config in zip( -- cgit v1.2.3-70-g09d2