Merge pull request !43330 from 李林杰/code_docs_1008_fix_doc_master
This commit is contained in:
i-robot 2022-10-08 07:11:29 +00:00 committed by Gitee
commit ca49c7577c
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 2 additions and 3 deletions

View File

@ -58,7 +58,6 @@ mindspore.ops.strided_slice
- **shrink_axis_mask** (int可选) - 表示切片的收缩维度掩码。如果第i位设置为1则意味着第i维度缩小为1。为int型掩码。默认值0。
返回:
返回根据起始索引、结束索引和步长进行提取出的切片Tensor。
异常:

View File

@ -94,7 +94,7 @@ def assign_sub(variable, value):
>>> variable = mindspore.Parameter(initializer(1, [1], mindspore.int32), name="global_step")
>>> value = Tensor(np.ones([1]).astype(np.int32) * 100)
>>> output = ops.assign_sub(variable, value)
>>> print(output)
>>> print(variable.asnumpy())
[-99]
"""
return assign_sub_(variable, value)

View File

@ -466,7 +466,7 @@ class AssignSub(Primitive):
>>> net = Net()
>>> value = Tensor(np.ones([1]).astype(np.int32)*100)
>>> output = net(value)
>>> print(output)
>>> print(net.variable.asnumpy())
[-99]
"""