fix examples issues

This commit is contained in:
万万没想到 2020-04-18 16:09:40 +08:00
parent d1b452cf3a
commit 8c1939f1b0
2 changed files with 3 additions and 1 deletions

View File

@ -26,6 +26,8 @@ Note:
- The Primitive operators in operations need to be used after instantiation.
- The composite operators are pre-defined combination of operator.
- The functional operators are the pre-instantiated Primitive operators, which can be used directly like a function.
- For functional operators usage, please refer to
https://gitee.com/mindspore/mindspore/blob/master/mindspore/ops/functional.py
"""
from .primitive import Primitive, PrimitiveWithInfer, prim_attr_register

View File

@ -795,7 +795,7 @@ class ZerosLike(PrimitiveWithInfer):
Examples:
>>> zeroslike = P.ZerosLike()
>>> x = Tensor(np.array([[0, 1], [2, 1]]).astype(np.int32))
>>> x = Tensor(np.array([[0, 1], [2, 1]]).astype(np.float32))
>>> output = zeroslike(x)
"""