From 04909137f52a0c6d495c4d882f9ef853a2fcd24d Mon Sep 17 00:00:00 2001 From: Zeng Jinle <32832641+sneaxiy@users.noreply.github.com> Date: Wed, 18 Dec 2019 01:03:49 -0600 Subject: [PATCH] fix lr assert, test=develop (#21780) --- python/paddle/fluid/dygraph/learning_rate_scheduler.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/python/paddle/fluid/dygraph/learning_rate_scheduler.py b/python/paddle/fluid/dygraph/learning_rate_scheduler.py index 864a00e2e14..bc7c694cee7 100644 --- a/python/paddle/fluid/dygraph/learning_rate_scheduler.py +++ b/python/paddle/fluid/dygraph/learning_rate_scheduler.py @@ -626,9 +626,8 @@ class LinearLrWarmup(LearningRateDecay): format(learning_rate)) self.learning_rate = learning_rate self.warmup_steps = warmup_steps - assert (end_lr > start_lr, - "end_lr {} MUST GREATER than start_lr {}".format(end_lr, - start_lr)) + assert end_lr > start_lr, "end_lr {} must be greater than start_lr {}".format( + end_lr, start_lr) self.lr_ratio_before_warmup = ( float(end_lr) - float(start_lr)) / float(warmup_steps) -- GitLab