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

fix scatter doc #26248

Merged
merged 4 commits into from
Aug 22, 2020
Merged

fix scatter doc #26248

merged 4 commits into from
Aug 22, 2020

Conversation

ForFishes
Copy link
Member

PR types

Others

PR changes

APIs

Describe

fix the doc of scatter

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

device, the result of `scatter` can not meet expectations due to the asynchronous calculation.

Args:
x (Tensor): The input N-D Tensor with rank>=1. Data type can be float32, float64.
Copy link
Contributor

Choose a reason for hiding this comment

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

rank -> ndim

Copy link
Member Author

Choose a reason for hiding this comment

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

ok fix it

out = np.array([[3, 3], [6, 6], [1, 1]])
out.shape # [3, 2]

**NOTICE**: When `overwrite` is True, `index` has repeated numbers and it runs on the GPU
Copy link
Contributor

Choose a reason for hiding this comment

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

这里是想说当有重复index的时候在gpu设备上的行为是不确定的吧。
感觉没说清楚。

Copy link
Member Author

Choose a reason for hiding this comment

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

对的。ok。我修复一下。

Copy link
Contributor

@jzhang533 jzhang533 left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

@XiaoguangHu01 XiaoguangHu01 left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -790,6 +789,100 @@ def unbind(input, axis=0):
return outs


def scatter(x, index, updates, overwrite=True, name=None):
Copy link
Contributor

Choose a reason for hiding this comment

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

fluid下的API补充下deprecated

@ForFishes ForFishes merged commit 190c695 into PaddlePaddle:develop Aug 22, 2020
@ForFishes ForFishes deleted the scatter branch August 22, 2020 01:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants