Skip to content
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

[SCU][Add API Legend No.21] Add the legend of scatter_nd_add_cn #6964

Merged
merged 13 commits into from
Dec 5, 2024
8 changes: 8 additions & 0 deletions docs/api/paddle/scatter_nd_add_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ scatter_nd_add

output = [[67, 19], [-16, -27]]

**示例一图解说明**:

在这个示例中,通过 Paddle 的 scatter_nd_add 函数对张量 x 进行稀疏加法操作。初始张量 x 为 [0, 1, 2, 3, 4, 5],通过 index 指定需要更新的索引位置,并使用 updates 中的值进行累加。scatter_nd_add 函数会根据 index 的位置逐步累加 updates 中的对应值,最终得到输出张量为 [0, 22, 12, 14, 4, 5],实现了对张量部分元素的累加更新而保持其他元素不变。
Copy link
Collaborator

Choose a reason for hiding this comment

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

图例的引用也放在文字说明下面呀


.. image:: ../../images/api_legend/scatter_nd_add.png
:width: 700
:alt: 示例一图示
:align: center

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