You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Scatter the values of the source tensor to the target tensor according to the given indices, and perform a reduction operation along the designated axis.
6956
+
6957
+
Args:
6958
+
input (Tensor) : The Input Tensor. Supported data types are bfloat16, float16, float32, float64,
6959
+
int32, int64, uint8.
6960
+
dim (int) : The axis to scatter 1d slices along.
6961
+
index (Tensor) : Indices to scatter along each 1d slice of input. This must match the dimension of input,
6962
+
Supported data type are int32 and int64.
6963
+
src (Tensor) : The value element(s) to scatter. The data types should be same as input.
6964
+
reduce (str): The reduce operation, support 'sum', 'prod', 'mean', 'amin', 'amax'.
6965
+
include_self (bool, optional): whether to reduce with the elements of input, default is 'True'.
6966
+
6967
+
Returns:
6968
+
Tensor, The indexed element, same dtype with input
6969
+
6970
+
Examples:
6971
+
.. code-block:: python
6972
+
6973
+
>>> import paddle
6974
+
6975
+
>>> x = paddle.to_tensor([[10, 20, 30], [40, 50, 60]])
0 commit comments