From 1635c02b9099885b33009544b39e78be44c5b3a5 Mon Sep 17 00:00:00 2001 From: Zeng Jinle <32832641+sneaxiy@users.noreply.github.com> Date: Tue, 7 Sep 2021 22:39:41 +0800 Subject: [PATCH] Fix scatter_nd_add doc (#35542) * fix scatter_nd_add doc, test=document_fix * update test=document_fix --- python/paddle/fluid/layers/nn.py | 2 +- python/paddle/tensor/manipulation.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/paddle/fluid/layers/nn.py b/python/paddle/fluid/layers/nn.py index 12a7ca2e441..6e8c1e80435 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 1f0c0ba24d9..7218254b34a 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 -- GitLab