Skip to content

Fix PaddleDocs function pad #7300

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
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
2 changes: 1 addition & 1 deletion docs/api/paddle/nn/functional/pad_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pad
.. note::
1. 记 ``x`` 的维数为 N (以下延用)。 ``pad`` 的长度:

1.1. 当 ``mode`` 为 ``'constant'`` 时, ``pad`` 的长度可以是任意小于等于 2*N 的偶数
1.1. 当 ``mode`` 为 ``'constant'`` 时, ``pad`` 的长度可以是任意小于等于 2*N 的整数
Copy link
Collaborator

Choose a reason for hiding this comment

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

可以展开说说偶数、奇数的情况

1.2. 当 ``mode`` 为 ``'reflect'``、 ``'replicate'`` 或 ``'circular'`` 时, ``pad`` 的长度必须为 2*(N-2)。

2. ``pad`` 的顺序:支持右对齐(从 ``x`` 的最后一维开始)。特别地,当 ``mode`` 为 ``'constant'`` ,且 ``pad`` 是长度为 2N 的列表时,pad 的顺序可以通过 ``pad_from_left_axis`` 参数来控制,如果 ``pad_from_left_axis`` 是 True,pad 的顺序则是左对齐;如果 ``pad_from_left_axis`` 是 False,pad 的顺序则是右对齐。
Expand Down