-
Notifications
You must be signed in to change notification settings - Fork 758
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
Paddle 文档修复 test=document_fix #5211
Conversation
感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-5211.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html |
@SigureMo 大佬有空再审核下 |
- threshold (float,可选) - Softplus 激活计算公式中的 threshold 值。默认值为 20。 | ||
- **x** (Tensor) - 输入的 ``Tensor``,数据类型为 float32 或 float64。 | ||
- **beta** (float,可选) - Softplus 激活计算公式中的 :math:`beta` 值。默认值为 1。 | ||
- **threshold** (float,可选) - Softplus 激活计算公式中的 :math:`threshold` 值。默认值为 20。 |
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.
关于参数使用 attr,这里我觉得因为明确说明了 公式中的
,因此我觉得使用 math 的优先级比 attr 更高些,而且这个是在陈述自己这个参数而不是引用别的参数。@BrilliantYuKaimin 觉得如何?
以及是否将目前新规范(dicussing)中下述表述进行修改?
- 在文档的源文件中应当用 :attr:`x` 这样的形式来表示一个参数。
+ 在文档的源文件中应当用 :attr:`x` 这样的形式来引用一个参数。
「引用」这一表述是否准确我不太确定,可能需要再调整
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.
是的,在这样的语境下应该使用 math。
把「引用」换成「提及」如何?
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.
把「引用」换成「提及」如何?
赞同~
一些最近规范中比较确定的部分我直接修改了,还没有确定的部分或者可能有争议的部分暂时没改,以及参数可选值详情是否需要以列表的形式展开的问题将会在新规范(dicussing)中进一步讨论以确定。 本 PR 可能会稍等等再 merge,可以先改好英文那边的 PR~ |
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.
自然对数的底
docs/api/paddle/nn/Softplus_cn.rst
Outdated
@@ -8,19 +8,21 @@ Softplus 激活层 | |||
|
|||
.. math:: | |||
|
|||
Softplus(x) = \frac{1}{beta} * \log(1 + e^{beta * x}) \\ | |||
softplus(x) = \frac{1}{beta} * \log(1 + e^{beta * x}) \\ |
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.
这里还是写成分段函数的形式吧。math 环境里不应该出现这样的长句。
另外建议用 \beta
代替 beta
,用 \varepsilon
代替 threshold
。这样可以缩短公式的长度。后面解释参数的地方也同样地修改。
SmoothL1Loss 中的 delta
也建议改成 \delta
。
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.
@mrcangye 这个和英文的一起改吧,我这边还没申请 Paddle repo 下的 write 权限,目前那边我还改不了
Co-authored-by: BrilliantYuKaimin <91609464+BrilliantYuKaimin@users.noreply.github.com>
Co-authored-by: BrilliantYuKaimin <91609464+BrilliantYuKaimin@users.noreply.github.com>
Co-authored-by: BrilliantYuKaimin <91609464+BrilliantYuKaimin@users.noreply.github.com>
Co-authored-by: BrilliantYuKaimin <91609464+BrilliantYuKaimin@users.noreply.github.com>
Co-authored-by: BrilliantYuKaimin <91609464+BrilliantYuKaimin@users.noreply.github.com>
Co-authored-by: BrilliantYuKaimin <91609464+BrilliantYuKaimin@users.noreply.github.com>
Co-authored-by: BrilliantYuKaimin <91609464+BrilliantYuKaimin@users.noreply.github.com>
Co-authored-by: BrilliantYuKaimin <91609464+BrilliantYuKaimin@users.noreply.github.com>
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.
@Ligoml 有空瞅瞅这个 PR,已经很久了 |
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.
good job!
LGTM
paddle.nn.Sigmoid
中:https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Sigmoid_cn.html#sigmoid
英:https://www.paddlepaddle.org.cn/documentation/docs/en/develop/api/paddle/nn/Sigmoid_en.html#sigmoid
存在问题:公式问题,PR修复
paddle.nn.functional.silu
中:https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/silu_cn.html#silu
英:https://www.paddlepaddle.org.cn/documentation/docs/en/develop/api/paddle/nn/functional/silu_en.html
存在问题:公式问题,PR修复
paddle.nn.SmoothL1Loss
中:https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/SmoothL1Loss_cn.html#smoothl1loss
英:https://www.paddlepaddle.org.cn/documentation/docs/en/develop/api/paddle/nn/SmoothL1Loss_en.html
存在问题:出现op用语,zi公式未能成功显示,代码示例没有结果输出,PR修复
paddle.nn.functional.smooth_l1_loss
中:https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/smooth_l1_loss_cn.html#smooth-l1-loss
英:https://www.paddlepaddle.org.cn/documentation/docs/en/develop/api/paddle/nn/functional/smooth_l1_loss_en.html
存在问题:出现op用语,zi公式未能成功显示,代码示例没有结果输出,PR修复
paddle.nn.Softmax
中:https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Softmax_cn.html#softmax
英:https://www.paddlepaddle.org.cn/documentation/docs/en/develop/api/paddle/nn/Softmax_en.html
存在问题:出现op用语,PR修复
paddle.nn.functional.softmax
中:https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/softmax_cn.html#softmax
英:https://www.paddlepaddle.org.cn/documentation/docs/en/develop/api/paddle/nn/functional/softmax_en.html
存在问题:出现op用语,PR修复
paddle.nn.Softplus
中:https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Softplus_cn.html#softplus
英:https://www.paddlepaddle.org.cn/documentation/docs/en/develop/api/paddle/nn/Softplus_en.html
存在问题:公式问题,PR修复
paddle.nn.functional.softplus
中:https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/softplus_cn.html#softplus
英:https://www.paddlepaddle.org.cn/documentation/docs/en/develop/api/paddle/nn/functional/softplus_en.html
存在问题:公式问题,PR修复
PADDLEPADDLE_PR=45488
en docs: PaddlePaddle/Paddle#45488