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

Paddle 文档修复 test=document_fix #5211

Merged
merged 31 commits into from
Oct 8, 2022
Merged

Paddle 文档修复 test=document_fix #5211

merged 31 commits into from
Oct 8, 2022

Conversation

mrcangye
Copy link
Contributor

@mrcangye mrcangye commented Aug 27, 2022

  1. 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修复

  2. 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修复

  3. 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修复

  4. 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修复

  5. 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修复

  6. 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修复

  7. 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修复

  8. 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

@paddle-bot
Copy link

paddle-bot bot commented Aug 27, 2022

感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-5211.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html
预览工具的更多说明,请参考:[Beta]飞桨文档预览工具

docs/api/paddle/nn/functional/sigmoid_cn.rst Show resolved Hide resolved
docs/api/paddle/nn/functional/silu_cn.rst Show resolved Hide resolved
docs/api/paddle/nn/functional/softmax_cn.rst Show resolved Hide resolved
docs/api/paddle/nn/Softmax_cn.rst Show resolved Hide resolved
docs/api/paddle/nn/Softplus_cn.rst Show resolved Hide resolved
docs/api/paddle/nn/SmoothL1Loss_cn.rst Show resolved Hide resolved
@mrcangye
Copy link
Contributor Author

mrcangye commented Sep 1, 2022

@SigureMo 大佬有空再审核下

- threshold (float,可选) - Softplus 激活计算公式中的 threshold 值。默认值为 20。
- **x** (Tensor) - 输入的 ``Tensor``,数据类型为 float32 或 float64。
- **beta** (float,可选) - Softplus 激活计算公式中的 :math:`beta` 值。默认值为 1。
- **threshold** (float,可选) - Softplus 激活计算公式中的 :math:`threshold` 值。默认值为 20。
Copy link
Member

@SigureMo SigureMo Sep 2, 2022

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` 这样的形式来引用一个参数。

「引用」这一表述是否准确我不太确定,可能需要再调整

Copy link
Contributor

Choose a reason for hiding this comment

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

是的,在这样的语境下应该使用 math。

把「引用」换成「提及」如何?

Copy link
Member

Choose a reason for hiding this comment

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

把「引用」换成「提及」如何?

赞同~

@SigureMo
Copy link
Member

SigureMo commented Sep 2, 2022

一些最近规范中比较确定的部分我直接修改了,还没有确定的部分或者可能有争议的部分暂时没改,以及参数可选值详情是否需要以列表的形式展开的问题将会在新规范(dicussing)中进一步讨论以确定。

本 PR 可能会稍等等再 merge,可以先改好英文那边的 PR~

Copy link
Contributor

@BrilliantYuKaimin BrilliantYuKaimin left a comment

Choose a reason for hiding this comment

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

自然对数的底 $\mathrm e$ 建议使用正体形式。

docs/api/paddle/nn/functional/sigmoid_cn.rst Outdated Show resolved Hide resolved
docs/api/paddle/nn/functional/silu_cn.rst Outdated Show resolved Hide resolved
docs/api/paddle/nn/Silu_cn.rst Outdated Show resolved Hide resolved
@@ -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}) \\
Copy link
Contributor

@BrilliantYuKaimin BrilliantYuKaimin Sep 3, 2022

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

Copy link
Member

Choose a reason for hiding this comment

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

@mrcangye 这个和英文的一起改吧,我这边还没申请 Paddle repo 下的 write 权限,目前那边我还改不了

SigureMo and others added 8 commits September 3, 2022 14:47
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>
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 ~

@BrilliantYuKaimin 相关的都改了,没啥问题来个 Approve~

英文在 PaddlePaddle/Paddle#45488

@SigureMo
Copy link
Member

@Ligoml 有空瞅瞅这个 PR,已经很久了

docs/api/paddle/nn/Silu_cn.rst Show resolved Hide resolved
docs/api/paddle/nn/SmoothL1Loss_cn.rst Outdated Show resolved Hide resolved
docs/api/paddle/nn/Softmax_cn.rst Show resolved Hide resolved
docs/api/paddle/nn/Softplus_cn.rst Show resolved Hide resolved
docs/api/paddle/nn/functional/softmax_cn.rst Show resolved Hide resolved
docs/api/paddle/nn/functional/softplus_cn.rst Show resolved Hide resolved
Copy link
Collaborator

@Ligoml Ligoml left a comment

Choose a reason for hiding this comment

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

good job!
LGTM

@Ligoml Ligoml merged commit 3dde9a5 into PaddlePaddle:develop Oct 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants