diff options
author | Jordan Gong <jordan.gong@protonmail.com> | 2022-08-20 10:04:41 +0800 |
---|---|---|
committer | Jordan Gong <jordan.gong@protonmail.com> | 2022-08-20 10:04:41 +0800 |
commit | 7661a84e4ff8c846fd8649b61afbea2cd4c6431e (patch) | |
tree | 75552d6ecd6b88925c47b8565923faa0d05886d7 /simclr | |
parent | 70d8351974d95978409068944de7112b55832d2b (diff) |
Fix scheduler stepping bugs
Diffstat (limited to 'simclr')
-rw-r--r-- | simclr/evaluate.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/simclr/evaluate.py b/simclr/evaluate.py index 8cbd454..91395d1 100644 --- a/simclr/evaluate.py +++ b/simclr/evaluate.py @@ -241,10 +241,10 @@ class SimCLREvalTrainer(SimCLRTrainer): eval_loss, eval_accuracy) self.log(logger, epoch_log) self.save_checkpoint(epoch_log) - if sched_b is not None and self.finetune: - sched_b.step() - if sched_c is not None: - sched_c.step() + if sched_b is not None and self.finetune: + sched_b.step() + if sched_c is not None: + sched_c.step() def eval(self, loss_fn: Callable, device: torch.device): backbone, classifier = self.models.values() |