提交 d6bdd37a 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!565 Fixing some operators'notes, which are mainly related with the data types...

!565 Fixing some operators'notes, which are mainly related with the data types of their examples' inputs.
Merge pull request !565 from zhangzheng/simple
......@@ -773,8 +773,8 @@ class Mul(_MathBinaryOp):
Tensor, the shape is same as the shape after broadcasting, and the data type is same as 'input_x'.
Examples:
>>> input_x = Tensor(np.array([1, 2, 3]), mindspore.int32)
>>> input_y = Tensor(np.array([4, 5, 6]), mindspore.int32)
>>> input_x = Tensor(np.array([1.0, 2.0, 3.0]), mindspore.float32)
>>> input_y = Tensor(np.array([4.0, 5.0, 6.0]), mindspore.float32)
>>> mul = P.Mul()
>>> mul(input_x, input_y)
[4, 10, 18]
......
......@@ -209,8 +209,8 @@ class IOU(PrimitiveWithInfer):
Examples:
>>> iou = P.IOU()
>>> anchor_boxes = Tensor(np.random.randint(1,5, [10, 4]))
>>> gt_boxes = Tensor(np.random.randint(1,5, [3, 4]))
>>> anchor_boxes = Tensor(np.random.randint(1.0, 5.0, [3, 4]), mindspore.float32)
>>> gt_boxes = Tensor(np.random.randint(1.0, 5.0, [3, 4]), mindspore.float32)
>>> iou(anchor_boxes, gt_boxes)
"""
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册