Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Docathon][Add API Legend No.13] add a figure of gather_nd -part #6943

Merged
merged 7 commits into from
Nov 20, 2024
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
1 change: 1 addition & 0 deletions docs/api/paddle/broadcast_to_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ broadcast_to

参数
:::::::::

- **x** (Tensor) - 输入的 Tensor,数据类型为:bool、float16、float32、float64、int32、int64、uint8 或 uint16。
- **shape** (tuple|list|Tensor) - 给定输入 ``x`` 扩展后的形状,若 ``shape`` 为 list 或者 tuple,则其中的元素值应该为整数或者是形状为 1-D 或 0-D 的 Tensor,若 ``shape`` 类型为 Tensor,则其应该为 1-D Tensor。
- **name** (str,可选) - 具体用法请参见 :ref:`api_guide_Name`,一般无需设置,默认值为 None。
Expand Down
11 changes: 10 additions & 1 deletion docs/api/paddle/gather_nd_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,16 @@ gather_nd
= [23]


**示例图解说明**:

下图展示了示例中的情形——一个形状为[2,3,4]的三维张量通过 gather_nd 操作分别输出三个不同的张量。通过比较,可以看出不同 index 下输出张量的差别。

.. figure:: ../../images/api_legend/gather_nd.png
:width: 761
:alt: 示例图示
:align: center


参数
::::::::::::

Expand All @@ -61,7 +71,6 @@ gather_nd

shape 为 index.shape[:-1] + x.shape[index.shape[-1]:]的 Tensor,数据类型与 :code:`x` 一致。


代码示例
::::::::::::

Expand Down
Binary file added docs/images/api_legend/gather_nd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.