提交 c2fc2904 编写于 作者: W wuzewu

Fix the problem that the learning rate is not updated

上级 f43c50a6
......@@ -347,7 +347,7 @@ class Trainer(object):
loss(paddle.Tensor) : Loss tensor.
'''
self.optimizer.step()
self.learning_rate_step(epoch_idx, batch_idx, self.optimizer.get_lr(), loss)
self.learning_rate_step(epoch_idx, batch_idx, self.optimizer._learning_rate, loss)
def learning_rate_step(self, epoch_idx: int, batch_idx: int, learning_rate: Generic, loss: paddle.Tensor):
if isinstance(learning_rate, paddle.optimizer.lr.LRScheduler):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册