Skip to content
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

【Hackathon 5th No.22】Add CosineAnnealingWarmRestarts API to Paddle -part #57744

Merged
merged 8 commits into from Nov 3, 2023

Conversation

Patrick-Star125
Copy link
Contributor

@Patrick-Star125 Patrick-Star125 commented Sep 26, 2023

PR types

New features

PR changes

APIs

Description

Add CosineAnnealingWarmRestarts API to Paddle

Link

Rfc PR: PaddlePaddle/community#649
docs PR: PaddlePaddle/docs#6286

待完成

  • RFC文档修改
  • 中文文档

@paddle-bot
Copy link

paddle-bot bot commented Sep 26, 2023

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@Patrick-Star125 Patrick-Star125 changed the title 【Hackathon 5 No.22】Add CosineAnnealingWarmRestarts API to Paddle 【Hackathon 5th No.22】Add CosineAnnealingWarmRestarts API to Paddle Sep 28, 2023
@paddle-ci-bot
Copy link

paddle-ci-bot bot commented Oct 6, 2023

Sorry to inform you that 04a048e's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually.

@luotao1
Copy link
Contributor

luotao1 commented Oct 16, 2023

请解决下冲突并通过多条CI

for place in places:
kwargs = {
'learning_rate': 0.5,
'T_0': 1,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

T_0 = 1 is special case, should add more test case when T_0 > 1

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@jeff41404
Copy link
Contributor

find a clerical error in rfc, leaning_rate should be learning_rate

jeff41404
jeff41404 previously approved these changes Oct 19, 2023
Copy link
Contributor

@jeff41404 jeff41404 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

When :math:`T_{cur}=0` after restart, set :math:`\eta_t=\eta_{max}`.

It has been proposed in
`SGDR: Stochastic Gradient Descent with Warm Restarts`_.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

链接没附上吧。写法参考引用方式

Comment on lines 2374 to 2375
eta_min (float, optional): Minimum learning rate. Default: 0.
last_epoch (int, optional): The index of last epoch. Default: -1.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

补充默认值代表的含义

@Patrick-Star125
Copy link
Contributor Author

Done

@paddle-ci-bot
Copy link

paddle-ci-bot bot commented Oct 28, 2023

Sorry to inform you that 4602ef3's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually.

@PaddlePaddle PaddlePaddle locked and limited conversation to collaborators Nov 2, 2023
@PaddlePaddle PaddlePaddle unlocked this conversation Nov 2, 2023
Copy link
Contributor

@sunzhongkai588 sunzhongkai588 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM for docs,请补充中文文档

@luotao1 luotao1 merged commit 0a428d0 into PaddlePaddle:develop Nov 3, 2023
27 of 28 checks passed
@luotao1 luotao1 changed the title 【Hackathon 5th No.22】Add CosineAnnealingWarmRestarts API to Paddle 【Hackathon 5th No.22】Add CosineAnnealingWarmRestarts API to Paddle -part Nov 3, 2023
zeroRains pushed a commit to zeroRains/Paddle that referenced this pull request Nov 8, 2023
…addlePaddle#57744)

* add CosineAnnealingWarmRestarts API

* modify test design

* modify api design

* formate code

* add test example

* fix documentation
danleifeng pushed a commit to danleifeng/Paddle that referenced this pull request Nov 14, 2023
…addlePaddle#57744)

* add CosineAnnealingWarmRestarts API

* modify test design

* modify api design

* formate code

* add test example

* fix documentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants