-
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
Add api MultiplicativeDecay #38250
Add api MultiplicativeDecay #38250
Conversation
Thanks for your contribution! |
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.
python/paddle/fluid/dygraph/learning_rate_scheduler.py 目录下的可以不用实现,是已废弃的API目录,实现python/paddle/optimizer/lr.py中的即可
Sorry to inform you that f9da7da's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually. |
Done, thanks. |
Sorry to inform you that 788dbcd's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually. |
python/paddle/optimizer/lr.py
Outdated
scheduler.step() # If you update learning rate each step | ||
# scheduler.step() # If you update learning rate each epoch | ||
|
||
# train on static graph mode |
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.
静态图模式不推荐使用,这里的 example 只放动态图即可~
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.
Done, thanks~
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 for docs
python/paddle/optimizer/lr.py
Outdated
if self.last_epoch > 0: | ||
return self.last_lr * self.lr_lambda(self.last_epoch) | ||
else: | ||
return self.last_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.
accroding to description of last_epoch in doc, return self.base_lr will be better?
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.
Done thanks~
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.
LG API
PR types
New features
PR changes
APIs
Describe
Add MultiplicativeDecay, refer to torch.optim.lr_scheduler.MultiplicativeLR