diff --git a/python/paddle/optimizer/lr.py b/python/paddle/optimizer/lr.py index d0d5eef03c42c032c7593998aeccae65ca5767fc..ea4349bc0b2c5ea9f3e3de6db3897ee04547c327 100644 --- a/python/paddle/optimizer/lr.py +++ b/python/paddle/optimizer/lr.py @@ -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