Browse Source

!9344 Add print illustration

From: @huangbingjian
Reviewed-by: @ginfung,@zh_qh
Signed-off-by: @zh_qh
tags/v1.1.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
ca053f0cbc
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      mindspore/ops/operations/debug_ops.py

+ 4
- 0
mindspore/ops/operations/debug_ops.py View File

@@ -347,6 +347,10 @@ class Print(PrimitiveWithInfer):
... self.print('Print Tensor x and Tensor y:', x, y)
... return x
...
>>> x = Tensor(np.ones([2, 1]).astype(np.int32))
>>> y = Tensor(np.ones([2, 2]).astype(np.int32))
>>> net = PrintDemo()
>>> output = net(x, y)
"""

@prim_attr_register


Loading…
Cancel
Save