Skip to content

Commit 565aae0

Browse files
committed
fix ildoonet#18 (warmlr for multiplier=1)
1 parent 6b5e895 commit 565aae0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

warmup_scheduler/scheduler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def step_ReduceLROnPlateau(self, metrics, epoch=None):
4141
epoch = self.last_epoch + 1
4242
self.last_epoch = epoch if epoch != 0 else 1 # ReduceLROnPlateau is called at the end of epoch, whereas others are called at beginning
4343
if self.last_epoch <= self.total_epoch:
44-
warmup_lr = [base_lr * ((self.multiplier - 1.) * self.last_epoch / self.total_epoch + 1.) for base_lr in self.base_lrs]
44+
warmup_lr = self.get_lr()
4545
for param_group, lr in zip(self.optimizer.param_groups, warmup_lr):
4646
param_group['lr'] = lr
4747
else:

0 commit comments

Comments
 (0)