From f23378ade29418c13fe029f1c154c208078e6008 Mon Sep 17 00:00:00 2001 From: Nan Du Date: Tue, 30 Jun 2020 21:46:35 -0700 Subject: [PATCH] Change get last lr to get lr for Pytorch 1.4.0 See https://www.kaggle.com/haqishen/train-efficientnet-b0-w-36-tiles-256-lb0-87#882901 --- warmup_scheduler/scheduler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/warmup_scheduler/scheduler.py b/warmup_scheduler/scheduler.py index 2ebdc70..8b84082 100644 --- a/warmup_scheduler/scheduler.py +++ b/warmup_scheduler/scheduler.py @@ -28,7 +28,7 @@ def get_lr(self): if not self.finished: self.after_scheduler.base_lrs = [base_lr * self.multiplier for base_lr in self.base_lrs] self.finished = True - return self.after_scheduler.get_last_lr() + return self.after_scheduler.get_lr() return [base_lr * self.multiplier for base_lr in self.base_lrs] if self.multiplier == 1.0: