Skip to content

[Docathon][Fix note No.39,41-43] #7153

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

Merged
merged 6 commits into from
Apr 1, 2025
Merged
Show file tree
Hide file tree
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/static/nn/sequence_pad_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ sequence_pad
序列填充操作符(Sequence Pad Operator),该 OP 将同一 batch 中的序列填充到一个一致的长度(由 ``maxlen`` 指定)。填充的新元素的值具体由输入 ``pad_value`` 指定,并会添加到每一个序列的末尾,使得他们最终的长度保持一致。最后返回一个 Python tuple ``(Out, Length)``,其中 LodTensor ``Out`` 为填充后的序列,LodTensor ``Length`` 为填充前的原序列长度信息。

.. note::
该 API 的输入 ``x`` 只能是带有 LoD 信息的 Tensor。
该 API 的输入 ``x`` 只能是带有 LoD 信息的 Tensor。

范例如下:

Expand Down
2 changes: 1 addition & 1 deletion docs/api/paddle/static/nn/sequence_reshape_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ sequence_reshape


.. note::
该 API 的输入只能是带有 LoD 信息的 Tensor,如果您需要处理的输入是 Tensor 类型,请使用 :ref:`paddle.reshape <cn_api_paddle_reshape>` 。
该 API 的输入只能是带有 LoD 信息的 Tensor,如果您需要处理的输入是 Tensor 类型,请使用 :ref:`paddle.reshape <cn_api_paddle_reshape>` 。

在指定 ``new_dim`` 参数下,通过序列原始长度、和原始 shape 计算出新的 shape,以输出包含新维度(new_dim)下的 Tensor。目前仅支持 1-level Tensor,请确保(原长度*原维数)可以除以新的维数,且每个序列没有余数。

Expand Down
2 changes: 1 addition & 1 deletion docs/api/paddle/static/nn/sequence_reverse_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sequence_reverse


.. note::
该 API 仅支持带有 LoD 信息的 Tensor。
该 API 仅支持带有 LoD 信息的 Tensor。

输入的 Tensor,在每个序列(sequence)上进行反转。目前仅支持对 LoD 层次(LoD level)为 1 的 Tensor 进行反转。该 OP 在构建反向 :ref:`cn_api_paddle_nn_RNN` 网络时十分有用。

Expand Down
2 changes: 1 addition & 1 deletion docs/api/paddle/static/nn/sequence_slice_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ sequence_slice
从给定序列中截取子序列。截取依据为按照所给相对开始位置的 ``offset`` (偏移量)和子序列长度 ``length`` 来截取子序列。

.. note::
该 API 输入只能是带有 LoD 信息的 Tensor,如果您需要处理的是 Tensor 类型,请使用 :ref:`paddle.slice <cn_api_paddle_slice>` 。
该 API 输入只能是带有 LoD 信息的 Tensor,如果您需要处理的是 Tensor 类型,请使用 :ref:`paddle.slice <cn_api_paddle_slice>` 。

.. code-block:: text

Expand Down