未验证 提交 04909137 编写于 作者: Z Zeng Jinle 提交者: GitHub

fix lr assert, test=develop (#21780)

上级 0eb4d990
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册