提交 78d997a8 编写于 作者: G guguguzi 提交者: jzhang533

fix bug for MultiplicativeDecay (#41850)

* fix bug for MultiplicativeDecay

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