From 53c2b4e1018a321904d03e735930b55b1916c446 Mon Sep 17 00:00:00 2001 From: peixu_ren Date: Mon, 2 Nov 2020 11:04:58 -0500 Subject: [PATCH] Fix a doc error in ReduceLogSumExp --- mindspore/nn/layer/math.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mindspore/nn/layer/math.py b/mindspore/nn/layer/math.py index 1305e2ab4e..295acf8749 100644 --- a/mindspore/nn/layer/math.py +++ b/mindspore/nn/layer/math.py @@ -36,11 +36,11 @@ class ReduceLogSumExp(Cell): The dtype of the tensor to be reduced is number. Args: + axis (Union[int, tuple(int), list(int)]) - The dimensions to reduce. Default: (), reduce all dimensions. + Only constant value is allowed. keep_dims (bool): If True, keep these reduced dimensions and the length is 1. If False, don't keep these dimensions. Default : False. - axis (Union[int, tuple(int), list(int)]) - The dimensions to reduce. Default: (), reduce all dimensions. - Only constant value is allowed. Inputs: - **input_x** (Tensor[Number]) - The input tensor. With float16 or float32 data type. @@ -57,7 +57,7 @@ class ReduceLogSumExp(Cell): Examples: >>> input_x = Tensor(np.random.randn(3, 4, 5, 6).astype(np.float32)) - >>> op = nn.ReduceLogSumExp(keep_dims=True, 1) + >>> op = nn.ReduceLogSumExp(1, keep_dims=True) >>> output = op(input_x) >>> output.shape (3, 1, 5, 6)