From 581229f7d75c3871d7300a25d43e8144f12c1eec Mon Sep 17 00:00:00 2001 From: ougongchang Date: Mon, 25 May 2020 15:27:27 +0800 Subject: [PATCH] fix summary ops api docstring --- mindspore/ops/operations/debug_ops.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mindspore/ops/operations/debug_ops.py b/mindspore/ops/operations/debug_ops.py index 0a9a51e71429..5129095374c4 100644 --- a/mindspore/ops/operations/debug_ops.py +++ b/mindspore/ops/operations/debug_ops.py @@ -26,7 +26,7 @@ def _check_summary_param(name, value, class_name): n_value = name['value'] validator.check_value_type('name', n_type, [type(mstype.string)], class_name) if not n_value: - raise ValueError(f"For 'name' the value should by valid string in {class_name}, but got {n_value}.") + raise ValueError(f"For 'name' the value should by valid string in {class_name}, but got an empty string.") v_type = value['dtype'] validator.check_value_type('value', v_type, [type(mstype.tensor)], class_name) @@ -37,8 +37,8 @@ class ScalarSummary(PrimitiveWithInfer): Output scalar to protocol buffer through scalar summary operator. Inputs: - - **name** (str) - The name of the input variable. - - **value** (Tensor) - The value of scalar. + - **name** (str) - The name of the input variable, it should not be an empty string. + - **value** (Tensor) - The value of scalar, and the shape of value should be [] or [1]. Examples: >>> class SummaryDemo(nn.Cell): @@ -75,8 +75,8 @@ class ImageSummary(PrimitiveWithInfer): Output image tensor to protocol buffer through image summary operator. Inputs: - - **name** (str) - The name of the input variable. - - **value** (Tensor) - The value of image. + - **name** (str) - The name of the input variable, it should not be an empty string. + - **value** (Tensor) - The value of image, the rank of tensor should be 4. Examples: >>> class Net(nn.Cell): @@ -113,7 +113,7 @@ class TensorSummary(PrimitiveWithInfer): Inputs: - **name** (str) - The name of the input variable. - - **value** (Tensor) - The value of tensor. + - **value** (Tensor) - The value of tensor, and the rank of tensor should be greater than 0. Examples: >>> class SummaryDemo(nn.Cell): -- Gitee