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

View File

@ -61,7 +61,6 @@
- **strides** (tuple[int]) - 指定各维度切片的步长。输入为一个tuple仅支持int值。`strides` 的元素必须非零。可能为负值,这会导致反向切片。
输出:
返回根据起始索引、结束索引和步长进行提取出的切片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]
"""