-
Notifications
You must be signed in to change notification settings - Fork 760
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.assign 等 API 的文档 #4850
Conversation
感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-4850.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html |
|
||
该算子根据输入 `x` , `output_size` 等参数对一个输入Tensor计算1D的自适应平均池化。输入和输出都是3-D Tensor, | ||
默认是以 `NCL` 格式表示的,其中 `N` 是 batch size, `C` 是通道数, `L` 是输入特征的长度. | ||
根据 `output_size` 对一个输入 Tensor 计算 1D 的自适应平均汇聚。输入和输出都是以 NCL 格式表示的 3-D Tensor,其中 N 是批大小,C 是通道数而 L 是特征的长度。输出的形状是 :math:`[N, C, output\_size]`。 |
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.
池化是比较常见的说法,汇聚是哪里的解释呢?
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.
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.
经过内部讨论,建议还是使用通用的翻译吧,原因有两个:
- 这套翻译术语目前暂未大规模推广开来,直接修改更容易增加理解成本,和文档「辅助开发者使用」的目的相悖;
- 飞桨有制定深度学习常用术语表,在表中写明了pooling使用通用的说法池化,飞桨的大量文档也是使用了这样的说法,全量修改是一个大工程。
如果未来这套术语得到国内开发者的广泛认可或官方推广,我们会考虑全量更新,但就目前的情况来看,可能时机尚不成熟~
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.
我先将“汇聚”改回为“池化”,但我不接受这个建议。如果连飞桨这样的平台都不去推广这样一个更合适的翻译,那它如何才能被国内开发者广泛知晓呢?
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.
好的,我们后续会做更多调研,来评估是否推广这一套翻译,感谢指出
@@ -6,45 +6,23 @@ adaptive_avg_pool1d | |||
|
|||
.. py:function:: paddle.nn.functional.adaptive_avg_pool1d(x, output_size, name=None) | |||
|
|||
该算子根据输入 `x` , `output_size` 等参数对一个输入Tensor计算1D的自适应平均池化。输入和输出都是3-D Tensor, | |||
默认是以 `NCL` 格式表示的,其中 `N` 是 batch size, `C` 是通道数, `L` 是输入特征的长度. | |||
根据 `output_size` 对 Tensor `x` 计算 1D 自适应平均汇聚。 |
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.
rst解析中,灰色底块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.
完成,原先确实不知道这一点。
@@ -6,45 +6,23 @@ adaptive_avg_pool1d | |||
|
|||
.. py:function:: paddle.nn.functional.adaptive_avg_pool1d(x, output_size, name=None) |
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.
建议同步修改AdaptiveAvgPool2D & adaptive_avg_pool2d、AdaptiveAvgPool3D & adaptive_avg_pool3d,问题是一样的
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.
还是留给接受“池化”这个翻译的同学去修改吧。
@@ -6,48 +6,26 @@ XavierNormal | |||
.. py:class:: paddle.nn.initializer.XavierNormal(fan_in=None, fan_out=None, name=None) | |||
|
|||
|
|||
该类实现Xavier权重初始化方法( Xavier weight initializer),Xavier权重初始化方法出自Xavier Glorot和Yoshua Bengio的论文 `Understanding the difficulty of training deep feedforward neural networks <http://proceedings.mlr.press/v9/glorot10a/glorot10a.pdf>`_ | |||
使用正态分布的泽维尔权重初始化方法。泽维尔权重初始化方法出自泽维尔·格洛特和约书亚·本吉奥的论文 `Understanding the difficulty of training deep feedforward neural networks <http://proceedings.mlr.press/v9/glorot10a/glorot10a.pdf>`_ |
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.
句尾标点符号
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/where_cn.rst
Outdated
\begin{cases} | ||
x_i, & \text{if} \ condition_i \ \text{is} \ True \\ | ||
y_i, & \text{if} \ condition_i \ \text{is} \ False \\ | ||
\end{cases} | ||
|
||
.. note:: | ||
``numpy.where(condition)`` 功能与 ``paddle.nonzero(condition, as_tuple=True)`` 相同。 |
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.
paddle.nonzero 最好加上超链接,可参考文档
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.
完成。
@@ -8,50 +8,32 @@ where | |||
|
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.
.. py:function:: paddle.where(condition, x=None, y=None, name=None)
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.
完成
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
PADDLEPADDLE_PR=42942
涉及到的 API 有
对应的英文文档修复为:PaddlePaddle/Paddle#42942