From c2fc29045935476e78a7e32611bf7ddf5be351c6 Mon Sep 17 00:00:00 2001 From: wuzewu Date: Mon, 2 Nov 2020 20:09:38 +0800 Subject: [PATCH] Fix the problem that the learning rate is not updated --- paddlehub/finetune/trainer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddlehub/finetune/trainer.py b/paddlehub/finetune/trainer.py index 02d657e3..860623a2 100644 --- a/paddlehub/finetune/trainer.py +++ b/paddlehub/finetune/trainer.py @@ -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): -- GitLab