From 7661a84e4ff8c846fd8649b61afbea2cd4c6431e Mon Sep 17 00:00:00 2001 From: Jordan Gong Date: Sat, 20 Aug 2022 10:04:41 +0800 Subject: Fix scheduler stepping bugs --- simclr/evaluate.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'simclr/evaluate.py') 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() -- cgit v1.2.3