forked from mindspore-Ecosystem/mindspore
!43329 fix docs
Merge pull request !43329 from 李林杰/code_docs_1008_fix_doc_19
This commit is contained in:
commit
7619f5099d
|
@ -61,7 +61,6 @@
|
|||
- **strides** (tuple[int]) - 指定各维度切片的步长。输入为一个tuple,仅支持int值。`strides` 的元素必须非零。可能为负值,这会导致反向切片。
|
||||
|
||||
输出:
|
||||
|
||||
返回根据起始索引、结束索引和步长进行提取出的切片Tensor。
|
||||
|
||||
异常:
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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]
|
||||
"""
|
||||
|
||||
|
|
Loading…
Reference in New Issue