未验证 提交 14573629 编写于 作者: G guguguzi 提交者: GitHub

fix bug for MultiplicativeDecay (#41850)

* fix bug for MultiplicativeDecay

* remove changes to test_lr_scheduler.py
上级 aa67c292
......@@ -1587,7 +1587,7 @@ class MultiplicativeDecay(LRScheduler):
verbose)
def get_lr(self):
if self.last_epoch > 0:
return self.last_lr * self.lr_lambda(self.last_epoch)
else:
return self.base_lr
cur_lr = self.base_lr
for epoch in range(1, self.last_epoch + 1):
cur_lr = cur_lr * self.lr_lambda(epoch)
return cur_lr
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册