forked from mindspore-Ecosystem/mindspore
!43330 fix docs
Merge pull request !43330 from 李林杰/code_docs_1008_fix_doc_master
This commit is contained in:
commit
ca49c7577c
|
@ -58,7 +58,6 @@ mindspore.ops.strided_slice
|
|||
- **shrink_axis_mask** (int,可选) - 表示切片的收缩维度掩码。如果第i位设置为1,则意味着第i维度缩小为1。为int型掩码。默认值:0。
|
||||
|
||||
返回:
|
||||
|
||||
返回根据起始索引、结束索引和步长进行提取出的切片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