diff --git a/python/paddle/fluid/dygraph/learning_rate_scheduler.py b/python/paddle/fluid/dygraph/learning_rate_scheduler.py index 864a00e2e14fe5342c806c4271c070fb45141266..bc7c694cee7662702b3f42f11e9f6de28aeb86e1 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)