!37346 [MS][DOC] fix bug of doc

Merge pull request !37346 from mengyuanli/code_docs_bug_fix
This commit is contained in:
i-robot 2022-07-05 11:22:10 +00:00 committed by Gitee
commit 1c08d29bb6
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 4 additions and 3 deletions

View File

@ -13,7 +13,7 @@ mindspore.ops.interpolate
**参数:**
- **x** (Tensor) - 输入3到5维的Tensor。
- **x** (Tensor) - 输入3维或者4维的Tensor。
- **roi** (tuple[float] 可选) - 在 `crop_and_resize` 坐标变换模式下生效,当前不支持。
- **scales** (tuple[float] 可选) - 输入shape每个维度resize的系数。 `scales` 的长度跟 `x` 的shape长度相同。 `scales``size` 同时只能指定一个。
- **sizes** (tuple[int] 可选) - 输入shape指定轴的新维度。 `scales``size` 同时只能指定一个。当 `mode` 是"linear"时, `size` 为1个int元素 :math:`(new\_width,)` 的tuple。当 `mode` 是"bilinear"时, `size` 为2个int元素 :math:`(new\_height, new\_width)` 的tuple。

View File

@ -2379,6 +2379,7 @@ def tensor_scatter_elements(input_x, indices, updates, axis=0, reduction="none")
value according to the indices.
For a 3-D tensor, the output is:
.. code-block::
output[indices[i][j][k]][j][k] = updates[i][j][k] # if axis == 0, reduction == "none"
@ -2406,7 +2407,7 @@ def tensor_scatter_elements(input_x, indices, updates, axis=0, reduction="none")
axis (int): Which axis to scatter, default is 0. Accepted range is [-r, r) where r = rank(input_x).
reduction (string): Which reduction operation to scatter, default is "none". Other option: "add".
Outputs:
Returns:
Tensor, has the same shape and type as `input_x`.
Raises:

View File

@ -619,7 +619,7 @@ def interpolate(x, roi=None, scales=None, sizes=None, coordinate_transformation_
when mode is "bilinear".
Args:
x (Tensor): a 3-D, 4-D or 5-D tensor which to resize.
x (Tensor): a 3-D or 4-D tensor which to resize.
roi (tuple[float], optional): a tuple of float. Only takes effect when attr coordinate_transformation_mode is
'crop_and_resize'.
scales (tuple[float], optional): a tuple of float. Describe the scale along each dimension. Its length is the