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

[xdoctest][task 365-370] reformat example code with google style in paddle/incubate/nn/functional/ ,paddle/incubate/optimizer/ #58178

Merged
merged 4 commits into from
Nov 3, 2023

Conversation

ooooo-create
Copy link
Contributor

PR types

Others

PR changes

Others

Description

修改如下文件的示例代码,使其通过 xdoctest 检查:

  • python/paddle/incubate/nn/functional/fused_layer_norm.py
  • python/paddle/incubate/nn/functional/masked_multihead_attention.py
  • python/paddle/incubate/nn/functional/variable_length_memory_efficient_attention.py
  • python/paddle/incubate/optimizer/gradient_merge.py
  • python/paddle/incubate/optimizer/lars_momentum.py

预览:

Related links

@sunzhongkai588 @SigureMo @megemini

@paddle-bot
Copy link

paddle-bot bot commented Oct 18, 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.

@paddle-bot paddle-bot bot added the contributor External developers label Oct 18, 2023
@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label Oct 18, 2023
SigureMo
SigureMo previously approved these changes Oct 20, 2023
Copy link
Member

@SigureMo SigureMo left a comment

Choose a reason for hiding this comment

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

LGTMeow 🐾

>>> optimizer = paddle.incubate.optimizer.LarsMomentumOptimizer(learning_rate=0.001, momentum=0.9)
>>> optimizer.minimize(out)

>>> exe = paddle.static.Executor(base.CPUPlace())
Copy link
Contributor

Choose a reason for hiding this comment

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

base.CPUPlace() -> paddle.CPUPlace()

@paddle-ci-bot
Copy link

paddle-ci-bot bot commented Oct 28, 2023

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

@luotao1 luotao1 merged commit 45b7903 into PaddlePaddle:develop Nov 3, 2023
28 checks passed
zeroRains pushed a commit to zeroRains/Paddle that referenced this pull request Nov 8, 2023
…`paddle/incubate/nn/functional/` ,`paddle/incubate/optimizer/` (PaddlePaddle#58178)

* [Doctest]fix No.365-370, test=docs_preview

* Apply suggestions from code review

* Update python/paddle/incubate/optimizer/lars_momentum.py

---------

Co-authored-by: Nyakku Shigure <[email protected]>
danleifeng pushed a commit to danleifeng/Paddle that referenced this pull request Nov 14, 2023
…`paddle/incubate/nn/functional/` ,`paddle/incubate/optimizer/` (PaddlePaddle#58178)

* [Doctest]fix No.365-370, test=docs_preview

* Apply suggestions from code review

* Update python/paddle/incubate/optimizer/lars_momentum.py

---------

Co-authored-by: Nyakku Shigure <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers HappyOpenSource 快乐开源活动issue与PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants