Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/api/paddle/nn/Pad1D_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ Pad1D
参数
::::::::::::

- **padding** (Tensor | List[int] | int) - 填充大小。如果是 int,则在所有待填充边界使用相同的填充,
- **padding** (Tensor|list[int]|int) - 填充大小。如果是 int,则在所有待填充边界使用相同的填充,
Copy link
Member

Choose a reason for hiding this comment

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

中文里同一个参数不建议折行,直接把下一行放在后面即可

否则填充的格式为[pad_left, pad_right]。
- **mode** (str) - padding 的四种模式,分别为 ``'constant'``, ``'reflect'``, ``'replicate'`` 和 ``'circular'``。
- **mode** (str,可选) - padding 的四种模式,分别为 ``'constant'``, ``'reflect'``, ``'replicate'`` 和 ``'circular'``。
Copy link
Member

@SigureMo SigureMo Aug 15, 2022

Choose a reason for hiding this comment

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

这里各个可选值在中文用隔开

另外,默认值没啦 😂,记得加回来。英文那边也也按这种列表的形式同步修改下吧~

``'constant'`` 表示填充常数 ``value`` ; ``'reflect'`` 表示填充以输入边界值为轴的映射;``'replicate'`` 表示
填充输入边界值;``'circular'`` 为循环填充输入。默认值为 ``'constant'``。
Copy link
Member

@SigureMo SigureMo Aug 15, 2022

Choose a reason for hiding this comment

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

这里也不应该折行,个人建议使用列表的方式来展示各个可选值的意义:

  - **mode** (str,可选) - padding 的模式,可选值为 ``'constant'``, ``'reflect'``, ``'replicate'`` 和 ``'circular'``。默认值为 ``'constant'``。
    - ``'constant'`` 表示填充常数 ``value``;
    - ``'reflect'`` 表示填充以输入边界值为轴的映射;
    - ``'replicate'`` 表示填充输入边界值;
    - ``'circular'`` 为循环填充输入。

- **value** (float32) - 以 ``'constant'`` 模式填充区域时填充的值。默认值为 0.0。
- **data_format** (str) - 指定输入的 format,可为 ``'NCL'`` 或者 ``'NLC'``,默认值为 ``'NCL'``。
- **value** (float,可选) - 以 ``'constant'`` 模式填充区域时填充的值。默认值为 0.0。
Copy link
Member

Choose a reason for hiding this comment

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

这里的默认值用:

:math:`0.0`

- **data_format** (str,可选) - 指定输入的 format,可为 ``'NCL'`` 或者 ``'NLC'``,默认值为 ``'NCL'``。
Copy link
Member

Choose a reason for hiding this comment

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

format 翻译一下吧,参考其他的大多翻译成了数据格式

- **name** (str,可选) - 具体用法请参见 :ref:`api_guide_Name`,一般无需设置,默认值为 None。

返回
Expand Down
8 changes: 4 additions & 4 deletions docs/api/paddle/nn/Pad2D_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ Pad2D
参数
::::::::::::

- **padding** (Tensor | List[int] | int]) - 填充大小。如果是 int,则在所有待填充边界使用相同的填充,
- **padding** (Tensor|list[int]|int]) - 填充大小。如果是 int,则在所有待填充边界使用相同的填充,
否则填充的格式为[pad_left, pad_right, pad_top, pad_bottom]。
- **mode** (str) - padding 的四种模式,分别为 ``'constant'``, ``'reflect'``, ``'replicate'`` 和 ``'circular'``。
- **mode** (str,可选) - padding 的四种模式,分别为 ``'constant'``, ``'reflect'``, ``'replicate'`` 和 ``'circular'``。
``'constant'`` 表示填充常数 ``value``; ``'reflect'`` 表示填充以输入边界值为轴的映射;``'replicate'`` 表示
填充输入边界值;``'circular'`` 为循环填充输入。默认值为 ``'constant'`` 。
- **value** (float32) - 以 ``'constant'`` 模式填充区域时填充的值。默认值为 0.0。
- **data_format** (str) - 指定输入的 format,可为 ``'NCHW'`` 或者 ``'NHWC'``,默认值为 ``'NCHW'``。
- **value** (float,可选) - 以 ``'constant'`` 模式填充区域时填充的值。默认值为 0.0。
- **data_format** (str,可选) - 指定输入的 format,可为 ``'NCHW'`` 或者 ``'NHWC'``,默认值为 ``'NCHW'``。
- **name** (str,可选) - 具体用法请参见 :ref:`api_guide_Name`,一般无需设置,默认值为 None。

返回
Expand Down
8 changes: 4 additions & 4 deletions docs/api/paddle/nn/Pad3D_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ Pad3D
参数
::::::::::::

- **padding** (Tensor | List[int] | int) - 填充大小。如果是 int,则在所有待填充边界使用相同的填充,
- **padding** (Tensor|list[int]|int) - 填充大小。如果是 int,则在所有待填充边界使用相同的填充,
否则填充的格式为[pad_left, pad_right, pad_top, pad_bottom, pad_front, pad_back]。
- **mode** (str) - padding 的四种模式,分别为 ``'constant'``, ``'reflect'``, ``'replicate'`` 和 ``'circular'``。
- **mode** (str,可选) - padding 的四种模式,分别为 ``'constant'``, ``'reflect'``, ``'replicate'`` 和 ``'circular'``。
``'constant'`` 表示填充常数 ``value``; ``'reflect'`` 表示填充以输入边界值为轴的映射;``'replicate'`` 表示
填充输入边界值;``'circular'`` 为循环填充输入。默认值为 ``'constant'`` 。
- **value** (float32) - 以 ``'constant'`` 模式填充区域时填充的值。默认值为 0.0。
- **data_format** (str) - 指定输入的 format,可为 ``'NCDHW'`` 或者 ``'NDHWC'``,默认值为 ``'NCDHW'``。
- **value** (float,可选) - 以 ``'constant'`` 模式填充区域时填充的值。默认值为 0.0。
- **data_format** (str,可选) - 指定输入的 format,可为 ``'NCDHW'`` 或者 ``'NDHWC'``,默认值为 ``'NCDHW'``。
- **name** (str,可选) - 具体用法请参见 :ref:`api_guide_Name`,一般无需设置,默认值为 None。

返回
Expand Down