未验证 提交 286fd577 编写于 作者: 傅剑寒 提交者: GitHub

fix docs error of index_put API (#53747)

This PR fix docs error of index_put , related dev PR is #53727
上级 b9bb6fe7
...@@ -4804,7 +4804,7 @@ def index_put_(x, indices, value, accumulate=False, name=None): ...@@ -4804,7 +4804,7 @@ def index_put_(x, indices, value, accumulate=False, name=None):
Args: Args:
x (Tensor) : The Source Tensor. Supported data types are int32, int64, float16, float32, float64, bool. x (Tensor) : The Source Tensor. Supported data types are int32, int64, float16, float32, float64, bool.
indices (Tuple of Tensor): The tuple of Tensor containing the indices to index. indices (Tuple of Tensor): The tuple of Tensor containing the indices to index.
The data type of ``tensor in indices`` must be int32, int64 or bool The data type of ``tensor in indices`` must be int32, int64 or bool.
value (Tensor): The tensor used to be assigned to x. value (Tensor): The tensor used to be assigned to x.
accummulate (Bool, optional): Whether the elements in values are added to x. Default: False. accummulate (Bool, optional): Whether the elements in values are added to x. Default: False.
name(str, optional): For details, please refer to :ref:`api_guide_Name`. Generally, no setting is required. Default: None. name(str, optional): For details, please refer to :ref:`api_guide_Name`. Generally, no setting is required. Default: None.
...@@ -4814,6 +4814,7 @@ def index_put_(x, indices, value, accumulate=False, name=None): ...@@ -4814,6 +4814,7 @@ def index_put_(x, indices, value, accumulate=False, name=None):
Examples: Examples:
.. code-block:: python .. code-block:: python
import paddle import paddle
x = paddle.zeros([3, 3]) x = paddle.zeros([3, 3])
...@@ -4844,6 +4845,7 @@ def index_put(x, indices, value, accumulate=False, name=None): ...@@ -4844,6 +4845,7 @@ def index_put(x, indices, value, accumulate=False, name=None):
Examples: Examples:
.. code-block:: python .. code-block:: python
import paddle import paddle
x = paddle.zeros([3, 3]) x = paddle.zeros([3, 3])
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册