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 英文文档 #69749

Merged
merged 4 commits into from
Dec 2, 2024

Conversation

jiachengdai
Copy link
Contributor

PR Category

User Experience

PR Types

Docs

Description

update doc for scatter https://www.paddlepaddle.org.cn/documentation/docs/en/develop/api/paddle/scatter_en.html
中文文档的pull request PaddlePaddle/docs#6973
@sunzhongkai588 @luotao1 @FeixLiu

Copy link

paddle-bot bot commented Nov 27, 2024

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@@ -4169,6 +4169,11 @@ def scatter(
**Scatter Layer**
Output is obtained by updating the input on selected indices based on updates.

In the following figure, when overwrite is True, update the output of the same index using the overlay mode, in turn updating ``x[index[i]]`` to ``update[i]``; When overwrite is False, the output of the same index is updated using the summative mode, which first updates ``x[index[i]]`` to a Tensor of the same size as the row with values of 0. Add ``update[i]`` to ``x[index[i]]`` in turn to produce output.
Copy link
Contributor

@sunzhongkai588 sunzhongkai588 Nov 27, 2024

Choose a reason for hiding this comment

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

感觉这块儿有点描述不够清晰,overlay好像挺少用的,in turn updating... 我一开始没看明白

Suggested change
In the following figure, when overwrite is True, update the output of the same index using the overlay mode, in turn updating ``x[index[i]]`` to ``update[i]``; When overwrite is False, the output of the same index is updated using the summative mode, which first updates ``x[index[i]]`` to a Tensor of the same size as the row with values of 0. Add ``update[i]`` to ``x[index[i]]`` in turn to produce output.
As shown in the figure, when ``overwrite`` is set to ``True``, the output for the same index is updated in overwrite mode, where ``x[index[i]]`` is directly replaced with ``update[i]`` sequentially; When ``overwrite`` is set to ``False``, the output for the same index is updated in accumulation mode. In this mode, ``x[index[i]]`` is first initialized with elements set to 0. Then, ``update[i]`` is sequentially added to ``x[index[i]]`` to produce the output.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

应该已经按照您的意见修改好并重新提交啦~

Copy link
Contributor

@sunzhongkai588 sunzhongkai588 left a comment

Choose a reason for hiding this comment

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

LGTM

@luotao1 luotao1 merged commit 420defe into PaddlePaddle:develop Dec 2, 2024
27 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers HappyOpenSource 快乐开源活动issue与PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants