We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9441f60 commit ed08c56Copy full SHA for ed08c56
test/legacy_test/test_scatter_reduce_op.py
@@ -27,7 +27,7 @@
27
def scatter_reduce_net(x, axis=-1):
28
index = paddle.full_like(x, fill_value=2, dtype='int64')
29
n = paddle.numel(x)
30
- ind = paddle.arange(n, dtype='float32')
+ ind = paddle.arange(n, dtype='int32').astype(x.dtype)
31
value = paddle.reshape(ind, x.shape)
32
return paddle.scatter_reduce(x, axis, index, value, reduce='sum')
33
0 commit comments