-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
replace PiecewiseDecay, StepDecay, MultiStepDecay, LambdaDecay with 2.0 version #53992
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
❌ The PR is not created using PR's template. You can refer to this Demo. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -98,6 +98,8 @@ def __init__(self, learning_rate=0.1, last_epoch=-1, verbose=False): | |||
type(learning_rate) | |||
) | |||
) | |||
if learning_rate < 0: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里为什么要补充这个限制呢,和某个API的单测有关吗
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
) | ||
for epoch in range(10): | ||
right_result = multi_step_decay( | ||
epoch, learning_rate, milestones, decay_rate | ||
) | ||
fluid_result = adam.current_step_lr() | ||
scheduler.epoch() | ||
fluid_result = adam.get_lr() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
paddle.optimizer.lr.LRScheduler
本身有test_imperative_optimizer_v2.py这个文件做测试。
目前看,test_learning_rate_scheduler.py这个文件本身是用来测试fluid下LearningRateDecay相关的内容。这个PR中验证通过替换成paddle.optimizer.lr.LRScheduler
后仍然能正确运转即可,后续可以考虑直接移除这个单测文件
Sorry to inform you that f9634c5's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually. |
ad3c4bd
to
f9634c5
Compare
… PiecewiseDecay
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no doc'c changes. LGTM
b20c0c9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no doc'c changes. LGTM
PR types
Others
PR changes
APIs
Description