-
Notifications
You must be signed in to change notification settings - Fork 776
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
对多个文档按照要求修改 #5453
对多个文档按照要求修改 #5453
Conversation
感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-5453.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html |
@Ligoml 请检查了,通过一下。 |
docs/api/paddle/nn/Upsample_cn.rst
Outdated
- **align_corners** (bool,可选)- 一个可选的 bool 型参数,如果为 True,则将输入和输出张量的 4 个角落像素的中心对齐,并保留角点像素的值。默认值为 True | ||
- **align_mode** (int,可选)- 双线性插值的可选项。可以是 '0' 代表 src_idx = scale *(dst_indx + 0.5)-0.5;如果为'1',代表 src_idx = scale * dst_index。 | ||
- **data_format** (str,可选)- 指定输入的数据格式,输出的数据格式将与输入保持一致。对于 3-D Tensor,支持 NCHW(num_batches, channels, width),对于 4-D Tensor,支持 NCHW(num_batches, channels, height, width) 或者 NHWC(num_batches, height, width, channels),对于 5-D Tensor,支持 NCDHW(num_batches, channels, depth, height, width)或者 NDHWC(num_batches, depth, height, width, channels),默认值:'NCHW'。 | ||
- **align_corners** (bool,可选)- 一个可选的 bool 型参数,如果为 True,则将输入和输出张量的 4 个角落像素的中心对齐,并保留角点像素的值。默认值为 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.
(bool,可选)
和 -
之间加一个空格
默认值为 False
。
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.
明白了
@SigureMo 已经修改了再检查一下。 |
你指的是哪个地方,我记得我我改成这样了:
- **size** (list|tuple|Tensor|None) - 输出 Tensor 的形状,输入为 3D 张量时,形状为为(out_w)的 1-D Tensor。输入为 4D 张量时,形状为为(out_h, out_w)的 2-D Tensor。输入为 5-D Tensor 时,形状为(out_d, out_h, out_w)的 3-D Tensor。如果 :code:`size` 是列表,每一个元素可以是整数或者形状为[1]的变量。如果 :code:`size` 是变量,则其维度大小为 1。默认值为 None。
- **scale_factor** (float|Tensor|list|tuple|None)-输入的深度、高度或宽度的缩放因子。:code:`size` 和 :code:`scale_factor` 至少要设置一个。:code:`size` 的优先级高于:code:`scale_factor`。默认值为 None。如果 scale_factor 是一个 list 或 tuple,它必须与输入的 shape 匹配。
- **mode** (str,可选) - 插值方法。支持"bilinear"或"trilinear"或"nearest"或"bicubic"或"linear"或"area"。默认值为"nearest"。
- **align_corners** (bool,可选) - 一个可选的 bool 型参数,如果为 True,则将输入和输出张量的 4 个角落像素的中心对齐,并保留角点像素的值。默认值为 True。
- **align_mode** (int,可选) - 双线性插值的可选项。可以是 '0' 代表 src_idx = scale *(dst_indx + 0.5)-0.5;如果为'1',代表 src_idx = scale * dst_index。默认值为 0。
- **data_format** (str,可选) - 指定输入的数据格式,输出的数据格式将与输入保持一致。对于 3-D Tensor,支持 NCW(num_batches, channels, width)或者 NWC(num_batches, width, channels),对于 4-D Tensor,支持 NCHW(num_batches, channels, height, width) 或者 NHWC(num_batches, height, width, channels),对于 5-D Tensor,支持 NCDHW(num_batches, channels, depth, height, width)或者 NDHWC(num_batches, depth, height, width, channels),默认值:'NCHW'。
- **name** (str,可选) - 具体用法请参见 :ref:`api_guide_Name`,一般无需设置,默认值为 None。
一泓
***@***.***
…------------------ 原始邮件 ------------------
发件人: "Nyakku ***@***.***>;
发送时间: 2022年11月28日(星期一) 下午3:39
收件人: ***@***.***>;
抄送: ***@***.***>; ***@***.***>;
主题: Re: [PaddlePaddle/docs] 对多个文档按照要求修改 (PR #5453)
@SigureMo commented on this pull request.
In docs/api/paddle/nn/Upsample_cn.rst:
> - **mode** (str,可选) - 插值方法。支持"bilinear"或"trilinear"或"nearest"或"bicubic"或"linear"或"area"。默认值为"nearest"。 - - **align_corners** (bool,可选)- 一个可选的 bool 型参数,如果为 True,则将输入和输出张量的 4 个角落像素的中心对齐,并保留角点像素的值。默认值为 True - - **align_mode** (int,可选)- 双线性插值的可选项。可以是 '0' 代表 src_idx = scale *(dst_indx + 0.5)-0.5;如果为'1',代表 src_idx = scale * dst_index。 - - **data_format** (str,可选)- 指定输入的数据格式,输出的数据格式将与输入保持一致。对于 3-D Tensor,支持 NCHW(num_batches, channels, width),对于 4-D Tensor,支持 NCHW(num_batches, channels, height, width) 或者 NHWC(num_batches, height, width, channels),对于 5-D Tensor,支持 NCDHW(num_batches, channels, depth, height, width)或者 NDHWC(num_batches, depth, height, width, channels),默认值:'NCHW'。 + - **align_corners** (bool,可选)- 一个可选的 bool 型参数,如果为 True,则将输入和输出张量的 4 个角落像素的中心对齐,并保留角点像素的值。默认值为 True
这个是不是没改
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
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,@Ligoml 检查一下~
Docs-NEW 运行不通过,是不是没有给通过??? 麻烦给看一下 @SigureMo |
根据提示等 @Ligoml 等人 review 即可 |
@yjphhw 英文文档的修改pr好像还没有提?这里有一部分问题是需要修改英文源码的哈,比如这个 |
docs/api/paddle/nn/Maxout_cn.rst
Outdated
@@ -20,7 +20,7 @@ Maxout 激活层,创建一个可调用对象计算。 | |||
|
|||
参数 | |||
:::::::::::: | |||
- **groups** (int) - 指定将输入张量的 channel 通道维度进行分组的数目。输出的通道数量为通道数除以组数。 | |||
- **groups** (int,可选) - 指定将输入张量的 channel 通道维度进行分组的数目。输出的通道数量为通道数除以组数。默认值为 1。 |
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.nn.Maxout(groups, axis=1, name=None)
所以group其实应该是必选参数,没有默认值
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.
其实这个翻译还是有点问题的,groups
英文的需要在paddle的源代码里改?也就是还需要下载 paddlepaddle的源?
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的源代码里改?也就是还需要下载 paddlepaddle的源?
对的,英文文档在 https://github.com/PaddlePaddle/paddle ,#5453 (comment) 说了怎么找相应的源代码
@@ -1,17 +1,17 @@ | |||
.. _cn_api_fluid_layers_unfold: | |||
|
|||
unfold | |||
Unfold |
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!英文文档删除一下 this op 吧~
docs/api/paddle/nn/Upsample_cn.rst
Outdated
- **size** (list|tuple|Variable|None) - 输出 Tensor,输入为 3D 张量时,形状为为(out_w)的 1-D Tensor。输入为 4D 张量时,形状为为(out_h, out_w)的 2-D Tensor。输入为 5-D Tensor 时,形状为(out_d, out_h, out_w)的 3-D Tensor。如果 :code:`out_shape` 是列表,每一个元素可以是整数或者形状为[1]的变量。如果 :code:`out_shape` 是变量,则其维度大小为 1。默认值为 None。 | ||
- **scale_factor** (float|Tensor|list|tuple|None)-输入的高度或宽度的乘数因子。out_shape 和 scale 至少要设置一个。out_shape 的优先级高于 scale。默认值为 None。如果 scale_factor 是一个 list 或 tuple,它必须与输入的 shape 匹配。 | ||
- **size** (list|tuple|Tensor|None) - 输出 Tensor 的形状,输入为 3D 张量时,形状为为(out_w)的 1-D Tensor。输入为 4D 张量时,形状为为(out_h, out_w)的 2-D Tensor。输入为 5-D Tensor 时,形状为(out_d, out_h, out_w)的 3-D Tensor。如果 :code:`size` 是列表,每一个元素可以是整数或者形状为[1]的变量。如果 :code:`size` 是变量,则其维度大小为 1。默认值为 None。 | ||
- **scale_factor** (float|Tensor|list|tuple|None)-输入的深度、高度或宽度的缩放因子。:code:`size` 和 :code:`scale_factor` 至少要设置一个。:code:`size` 的优先级高于:code:`scale_factor`。默认值为 None。如果 scale_factor 是一个 list 或 tuple,它必须与输入的 shape 匹配。 |
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.
- **scale_factor** (float|Tensor|list|tuple|None)-输入的深度、高度或宽度的缩放因子。:code:`size` 和 :code:`scale_factor` 至少要设置一个。:code:`size` 的优先级高于:code:`scale_factor`。默认值为 None。如果 scale_factor 是一个 list 或 tuple,它必须与输入的 shape 匹配。 | |
- **scale_factor** (float|Tensor|list|tuple|None)-输入的深度、高度或宽度的缩放因子。:code:`size` 和 :code:`scale_factor` 至少要设置一个。:code:`size` 的优先级高于 :code:`scale_factor`。默认值为 None。如果 scale_factor 是一个 list 或 tuple,它必须与输入的 shape 匹配。 |
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.
另外 size=None, scale_factor=None ,所以这俩是可选参数啦
@@ -29,13 +29,13 @@ mse_loss | |||
::::::::: | |||
- **input** (Tensor) - 预测值,维度为 :math:`[N_1, N_2, ..., N_k]` 的多维 Tensor。数据类型为 float32 或 float64。 | |||
- **label** (Tensor) - 目标值,维度为 :math:`[N_1, N_2, ..., N_k]` 的多维 Tensor。数据类型为 float32 或 float64。 | |||
- **reduction** (string, optional) - 输出的归约方法可以是'none'、'mean'或'sum'。 | |||
- **reduction** (string, 可选) - 输出的归约方法可以是'none'、'mean'或'sum'。 |
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.
- **reduction** (string, 可选) - 输出的归约方法可以是'none'、'mean'或'sum'。 | |
- **reduction** (str, 可选) - 输出的归约方法可以是'none'、'mean'或'sum'。 |
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的源码里的docstring里改?
…---原始邮件---
发件人: ***@***.***>
发送时间: 2022年11月30日(周三) 下午2:59
收件人: ***@***.***>;
抄送: ***@***.******@***.***>;
主题: Re: [PaddlePaddle/docs] 对多个文档按照要求修改 (PR #5453)
@yjphhw 英文文档的修改pr好像还没有提?这里有一部分问题是需要修改英文源码的哈,比如这个 paddle.nn.Maxout 中文是对的,英文文档给参数 groups 增加了一个 optional 的标识,但其实这不是可选参数,是必选参数
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
是的,要在paddle repo下提一个pr |
辛苦处理一下冲突哈 |
好的,下午就提交。因为paddle的库之前克隆都失败了。 |
中英文已经提交。 |
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 for docs
@Ligoml 感谢 耐心的指导! 其他的几个我也想修改,但是描述比较模糊,之前看到有群的请问怎么加入来具体咨询。 |
对paddle.nn.Unfold的任务进行了修改和完善
去掉了kernalsize的尺寸3x3,
把类型改为class,
修复了链接
对upsample中的该op ,以及一些符号错误进行了修正
PaddlePaddle/Paddle#48886