!37522 align docs for inplace_add and inplace_sub
Merge pull request !37522 from zhujingxuan/code_docs
This commit is contained in:
commit
c4ced0d5f9
|
@ -10,9 +10,9 @@ mindspore.ops.inplace_add
|
|||
|
||||
**参数:**
|
||||
|
||||
- **x** (Tensor) - 待更新的Tensor。
|
||||
- **v** (Tensor) - 待加上的值。
|
||||
- **indices** (Union[int, tuple]) - 待更新值在原Tensor中的索引。
|
||||
- **x** (Tensor) - 待更新的Tensor,支持的数据类型包括 float16,float32,float64,int32。
|
||||
- **v** (Tensor) - 待加上的值,除第0维外每一维度需与 `x` 相同。数据类型应与 `x` 相同。
|
||||
- **indices** (Union[int, tuple]) - 待更新值在原Tensor中的索引。取值范围[0, len(x))。若为tuple,则大小与 `v` 的第一维度大小相同。
|
||||
|
||||
**返回:**
|
||||
|
||||
|
|
|
@ -10,8 +10,8 @@ mindspore.ops.inplace_sub
|
|||
|
||||
**参数:**
|
||||
|
||||
- **x** (Tensor) - 待更新的Tensor,其秩应小于8。
|
||||
- **v** (Tensor) - 待减去的值。
|
||||
- **x** (Tensor) - 待更新的Tensor,支持的数据类型包括 float16,float32,float64,int32。
|
||||
- **v** (Tensor) - 待减去的值,除第0维外每一维度需与 `x` 相同。数据类型应与 `x` 相同。
|
||||
- **indices** (Union[int, tuple]) - 待更新值在原Tensor中的索引。取值范围[0, len(x))。若为tuple,则大小与 `v` 的第一维度大小相同。
|
||||
|
||||
**返回:**
|
||||
|
|
|
@ -876,7 +876,7 @@ def inplace_add(x, v, indices):
|
|||
Args:
|
||||
indices (Union[int, tuple]): Indices into the left-most dimension of `x`, and determines which rows of `x`
|
||||
to add with `v`. It is an integer or a tuple, whose value is in [0, the first dimension size of `x`).
|
||||
x (Tensor) - The first input is a tensor whose data type is float16, float32 or int32.
|
||||
x (Tensor) - The first input is a tensor whose data type is float16, float32, float64 or int32.
|
||||
:math:`(N,*)` where :math:`*` means, any number of additional dimensions, its rank should be less than 8.
|
||||
v (Tensor) - The second input is a tensor that has the same dimension sizes as `x` except
|
||||
the first dimension, which must be the same as indices' size. It has the same data type with `x`.
|
||||
|
@ -918,7 +918,7 @@ def inplace_sub(x, v, indices):
|
|||
Args:
|
||||
indices (Union[int, tuple]): Indices into the left-most dimension of `x`, and determines which rows of `x`
|
||||
to subtract with `v`. It is an int or tuple, whose value is in [0, the first dimension size of `x`).
|
||||
x (Tensor) - The first input is a tensor whose data type is float16, float32 or int32.
|
||||
x (Tensor) - The first input is a tensor whose data type is float16, float32, float64 or int32.
|
||||
:math:`(N,*)` where :math:`*` means, any number of additional dimensions, its rank should be less than 8.
|
||||
v (Tensor) - The second input is a tensor who has the same dimension sizes as `x` except
|
||||
the first dimension, which must be the same as indices' size. It has the same data type with `x`.
|
||||
|
|
Loading…
Reference in New Issue