-
Notifications
You must be signed in to change notification settings - Fork 838
修复paddle.amax、paddle.amin的参数问题,删除多个API中【返回类型】 #4978
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
Conversation
fix paddle.amax 参数与英文文档不一致问题。
fix paddle.amin 参数与英文文档不一致问题
全局搜索,屡试不爽(๑><๑)
是说这个嘛?貌似是个 fluid API 啊,fluid API 文档还需要修复嘛? |
返回类型 | ||
:::::::::::: | ||
Variable | ||
Tensor, 输入input经过conv2d和pool2d之后输入的结果,数据类型与input相同 |
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.
这些没有必要的空格可以删掉啦~
返回类型 | ||
:::::::::::: | ||
Variable | ||
Tensor, 输入input经过conv2d和pool2d之后输入的结果,数据类型与input相同 |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
Co-authored-by: Nyakku Shigure <sigure.qaq@gmail.com>
@@ -84,7 +84,8 @@ ctc_greedy_decoder | |||
|
|||
返回 | |||
:::::::::::: | |||
对于输入为LoDTensor的情况,返回CTC贪婪解码器的结果,即2-D LoDTensor,形状为[Lp,1],数据类型为int64。“Lp”是所有输出序列长度的总和。如果结果中的所有序列均为空,则结果LoDTensor将为[-1],其中LoD为[[]]。对于输入为Tensor的情况,返回一个元组,(output, output_length),其中,output是一个形状为 [batch_size, N],类型为int64的Tensor。output_length是一个形状为[batch_size, 1],类型为int64的Tensor,表示Tensor输入下,每个输出序列的长度。 | |||
对于输入为LoDTensor的情况,返回CTC贪婪解码器的结果,即2-D LoDTensor,形状为[Lp,1],数据类型为int64。“Lp”是所有输出序列长度的总和。如果结果中的所有序列均为空,则结果LoDTensor将为[-1],其中LoD为[[]]。 | |||
对于输入为Tensor的情况,返回一个元组,(output, output_length),其中,output是一个形状为 [batch_size, N],类型为int64的Tensor。output_length是一个形状为[batch_size, 1],类型为int64的Tensor,表示Tensor输入下,每个输出序列的长度。 |
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 来说,空一行才是拆分段落。仅仅换行只是为了美观折断过长的行,这样并不会渲染成两个段落(<p>
),只会在两行间加一个空格
这是一个段落这是一个段落这是一个段落这是一个段落这是一个段落
这是一个段落这是一个段落这是一个段落这是一个段落这是一个段落
这是一个段落这是一个段落这是一个段落这是一个段落这是一个段落
最终会渲染为
<p>这是一个段落这是一个段落这是一个段落这是一个段落这是一个段落 这是一个段落这是一个段落这是一个段落这是一个段落这是一个段落</p>
<p>这是一个段落这是一个段落这是一个段落这是一个段落这是一个段落</p>
ref: https://www.sphinx-doc.org/zh_CN/master/usage/restructuredtext/basics.html
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.
PS: 嫌麻烦咱可以直接把这个文件恢复了,毕竟是 fluid 下的 😂
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.
对,这个是fluid下的api,后面会逐步废弃
docs/api/paddle/amax_cn.rst
Outdated
- **axis** (list | int,可选)- 求最大值运算的维度。如果为None,则计算所有元素的最大值并返回包含单个元素的Tensor变量,否则必须在 :math:`[-x.ndim, x.ndim]` 范围内。如果 :math:`axis[i] <0`,则维度将变为 :math:`x.ndim+axis[i]`,默认值为None。 | ||
- **keepdim** (bool)- 是否在输出Tensor中保留减小的维度。如果keepdim 为 False,结果张量的维度将比输入张量的小,默认值为False。 | ||
- **x** (Tensor) - Tensor,支持数据类型为float32,float64,int32,int64,维度不超过4维。 | ||
- **axis** (int | list | tuple,可选) - 求最大值运算的维度。如果为None,则计算所有元素的最大值并返回包含单个元素的Tensor变量,否则必须在 :math:`[-x.ndim, x.ndim]` 范围内。如果 :math:`axis[i] <0`,则维度将变为 :math:`x.ndim+axis[i]`,默认值为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.
(int|list|tuple,可选)
多余的空格删一下吧
另外数据类型之间用、隔开
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 for amin、amax
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
中英文文档参数不一致。
删除多个API中【返回类型】
对应英文文档PR: PaddlePaddle/Paddle#43996
PADDLEPADDLE_PR=43996