diff --git a/python/paddle/fluid/layers/nn.py b/python/paddle/fluid/layers/nn.py index 12a7ca2e441157adef07682fad9ddc8430e5a37d..6e8c1e80435f5a5d2b6c945cda189a51eef1b6a3 100755 --- a/python/paddle/fluid/layers/nn.py +++ b/python/paddle/fluid/layers/nn.py @@ -8612,7 +8612,7 @@ def scatter_nd_add(ref, index, updates, name=None): output = [[67, 19], [-16, -27]] Args: - ref (Variable): The ref input. Its dtype should be float32, float64. + ref (Variable): The ref input. Its dtype should be int32, int64, float32, float64. index (Variable): The index input with rank > 1 and index.shape[-1] <= ref.rank. Its dtype should be int32 or int64 as it is used as indexes. updates (Variable): The updated value of scatter_nd_add op, and it must have the same dtype diff --git a/python/paddle/tensor/manipulation.py b/python/paddle/tensor/manipulation.py index 1f0c0ba24d95ba929e5a7e1236d1995c7c5cb1e3..7218254b34a5408f5c643a7ad56dafea2cf67784 100644 --- a/python/paddle/tensor/manipulation.py +++ b/python/paddle/tensor/manipulation.py @@ -1348,7 +1348,7 @@ def scatter_nd_add(x, index, updates, name=None): output = [[67, 19], [-16, -27]] Args: - x (Tensor): The x input. Its dtype should be float32, float64. + x (Tensor): The x input. Its dtype should be int32, int64, float32, float64. index (Tensor): The index input with ndim > 1 and index.shape[-1] <= x.ndim. Its dtype should be int32 or int64 as it is used as indexes. updates (Tensor): The updated value of scatter_nd_add op, and it must have the same dtype