From e7313d916d783744012ac7bb3011469d72803d25 Mon Sep 17 00:00:00 2001 From: Jordan Gong Date: Wed, 10 Aug 2022 19:54:37 +0800 Subject: Fix epoch scheduler problem --- libs/utils.py | 1 + 1 file changed, 1 insertion(+) (limited to 'libs/utils.py') diff --git a/libs/utils.py b/libs/utils.py index c019ba9..2f73705 100644 --- a/libs/utils.py +++ b/libs/utils.py @@ -91,6 +91,7 @@ class Trainer(ABC): raise NotImplementedError(f"Unknown log type: '{type(last_metrics)}'") if not inf_mode: num_iters *= len(train_loader) + config.sched_config.warmup_iters *= len(train_loader) # FIXME: a little bit hacky here scheds = dict(self._configure_scheduler( optims.items(), last_iter, num_iters, config.sched_config, )) -- cgit v1.2.3