!18882 fix cpu ops examples

Merge pull request !18882 from yanzhenxiang2020/code_docs_fix_cpu_ops_examples
This commit is contained in:
i-robot 2021-06-26 01:45:08 +00:00 committed by Gitee
commit 46acc789a1
2 changed files with 6 additions and 6 deletions

View File

@ -3671,7 +3671,7 @@ class TensorScatterUpdate(PrimitiveWithInfer):
ValueError: If the value of `input_x` are not match with input `indices`.
Supported Platforms:
``Ascend`` ``GPU``
``Ascend`` ``GPU`` ``CPU``
Examples:
>>> input_x = Tensor(np.array([[-0.1, 0.3, 3.6], [0.4, 0.5, -3.2]]), mindspore.float32)
@ -4656,7 +4656,7 @@ class SpaceToDepth(PrimitiveWithInfer):
ValueError: If length of shape of `x` is not equal to 4.
Supported Platforms:
``Ascend`` ``GPU``
``Ascend`` ``GPU`` ``CPU``
Examples:
>>> x = Tensor(np.random.rand(1,3,2,2), mindspore.float32)
@ -4725,7 +4725,7 @@ class DepthToSpace(PrimitiveWithInfer):
ValueError: If length of shape of `x` is not equal to 4.
Supported Platforms:
``Ascend`` ``GPU``
``Ascend`` ``GPU`` ``CPU``
Examples:
>>> x = Tensor(np.random.rand(1, 12, 1, 1), mindspore.float32)

View File

@ -4167,11 +4167,11 @@ class Atanh(PrimitiveWithInfer):
``Ascend`` ``CPU``
Examples:
>>> x = Tensor(np.array([1.047, 0.785]), mindspore.float32)
>>> x = Tensor(np.array([0, -0.5]), mindspore.float32)
>>> atanh = ops.Atanh()
>>> output = atanh(x)
>>> print(output)
[1.8869909 1.058268 ]
[0. -0.54930614]
"""
@prim_attr_register
@ -4526,7 +4526,7 @@ class Eps(PrimitiveWithInfer):
Tensor, has the same type and shape as `x`, but filled with `x` dtype minimum val.
Supported Platforms:
``Ascend`` ``GPU``
``Ascend`` ``GPU`` ``CPU``
Examples:
>>> x = Tensor([4, 1, 2, 3], mindspore.float32)