-
Notifications
You must be signed in to change notification settings - Fork 5.8k
docs: 增加 docstring 内容丰富中英文文档 #59271
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
docs: 增加 docstring 内容丰富中英文文档 #59271
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
✅ This PR's description meets the template requirements! |
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.
试一试加 seed
能不能固定住输出?
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.
已用我手动输入的 Tensor 解决了随机的问题
python/paddle/optimizer/lr.py
Outdated
@@ -55,6 +55,26 @@ class LRScheduler: | |||
|
|||
LRScheduler Base class. Define the common interface of a learning rate scheduler. | |||
|
|||
There are currently 14 strategies implemented in paddle based on this base class, which are: |
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.
列了 17 种
There are currently 14 strategies implemented in paddle based on this base class, which are: | |
There are currently 17 strategies implemented in paddle based on this base class, which are: |
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/optimizer/lr.py
Outdated
@@ -55,6 +55,26 @@ class LRScheduler: | |||
|
|||
LRScheduler Base class. Define the common interface of a learning rate scheduler. | |||
|
|||
There are currently 14 strategies implemented in paddle based on this base class, which are: | |||
|
|||
- ``NoamDecay``: Related algorithms are derived from `*Attention Is All You Need* <http://blog.inkypy.com>`_ . Please refer to :ref:`en_api_paddle_optimizer_lr_NoamDecay`. |
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 文档的 label 是由路径转化来的,如该例中的 paddle.optimizer.lr.NoamDecay
,label应该是api_paddle_optimizer_lr_NoamDecay
,中文的label则会在前面加 cn_
。
- ``NoamDecay``: Related algorithms are derived from `*Attention Is All You Need* <http://blog.inkypy.com>`_ . Please refer to :ref:`en_api_paddle_optimizer_lr_NoamDecay`. | |
- ``NoamDecay``: Related algorithms are derived from `*Attention Is All You Need* <http://blog.inkypy.com>`_ . Please refer to :ref:`api_paddle_optimizer_lr_NoamDecay`. |
下面每一条都按上述修改~
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.
已修改~
增加 class: LRScheduler 中文文档中介绍的 17 种策略至 docstring
修改 RandomHorizontalFlip 和 RandomVerticalFlip docstring 的示例代码
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~写的非常好
* docs(paddle.lr): 丰富 docstring 内容 增加 class: LRScheduler 中文文档中介绍的 17 种策略至 docstring * docs(paddle.vision.transforms): 增加docstring更具体的示例 修改 RandomHorizontalFlip 和 RandomVerticalFlip docstring 的示例代码
PR types
Function optimization
PR changes
Docs
Description
涉及到的 API 有
paddle.vision.transforms.RandomHorizontalFlip
paddle.vision.transforms.RandomVerticalFlip
paddle.lr.LRScheduler
相关 中英文文档
paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/optimizer/lr/LRScheduler_cn.html
paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/vision/transforms/RandomHorizontalFlip_cn.html
paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/vision/transforms/RandomVerticalFlip_cn.html