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

[Docathon][Add API Legend No.19]+添加图例至paddle.scatter #6973

Merged
merged 2 commits into from
Nov 25, 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
5 changes: 5 additions & 0 deletions docs/api/paddle/scatter_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ scatter

通过基于 ``updates`` 来更新选定索引 ``index`` 上的输入来获得输出。具体行为如下:

如下图,当 overwrite 为 True 的时候使用覆盖模式更新相同索引的输出,依次将 ``x[index[i]]`` 更新为 ``update[i]`` ;而当 overwrite 为 False 时使用累加模式更新相同索引的输出,先依次将 ``x[index[i]]`` 更新为与该行大小相同的元素值均为 0 的 Tensor ,再依次将 ``update[i]`` 加到 ``x[index[i]]`` 产生输出。

.. image:: ../../images/api_legend/scatter.png
:alt: 图例- scatter 的行为展示

COPY-FROM: paddle.scatter:scatter-example-1

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