-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
fix scatter doc #26248
Conversation
Thanks for your contribution! |
python/paddle/tensor/manipulation.py
Outdated
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rank -> ndim
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok fix it
python/paddle/tensor/manipulation.py
Outdated
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里是想说当有重复index的时候在gpu设备上的行为是不确定的吧。
感觉没说清楚。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
对的。ok。我修复一下。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this 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): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fluid下的API补充下deprecated
PR types
Others
PR changes
APIs
Describe
fix the doc of scatter