From 5bd859f82f2df83bbe4722d1faa9eeba405c11a1 Mon Sep 17 00:00:00 2001 From: HuangBingjian Date: Wed, 2 Dec 2020 09:40:53 +0800 Subject: [PATCH] add print illustration --- mindspore/ops/operations/debug_ops.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mindspore/ops/operations/debug_ops.py b/mindspore/ops/operations/debug_ops.py index df7cfe0dddd..f35f9052325 100644 --- a/mindspore/ops/operations/debug_ops.py +++ b/mindspore/ops/operations/debug_ops.py @@ -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