Browse Source

!8142 Fix a doc error in ReduceLogSumExp

Merge pull request !8142 from peixu_ren/custom_pp_ops
tags/v1.1.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
480aa68bf6
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      mindspore/nn/layer/math.py

+ 3
- 3
mindspore/nn/layer/math.py View File

@@ -36,11 +36,11 @@ class ReduceLogSumExp(Cell):
The dtype of the tensor to be reduced is number. The dtype of the tensor to be reduced is number.


Args: 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. keep_dims (bool): If True, keep these reduced dimensions and the length is 1.
If False, don't keep these dimensions. If False, don't keep these dimensions.
Default : False. Default : False.
axis (Union[int, tuple(int), list(int)]) - The dimensions to reduce. Default: (), reduce all dimensions.
Only constant value is allowed.


Inputs: Inputs:
- **input_x** (Tensor[Number]) - The input tensor. With float16 or float32 data type. - **input_x** (Tensor[Number]) - The input tensor. With float16 or float32 data type.
@@ -57,7 +57,7 @@ class ReduceLogSumExp(Cell):


Examples: Examples:
>>> input_x = Tensor(np.random.randn(3, 4, 5, 6).astype(np.float32)) >>> 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 = op(input_x)
>>> output.shape >>> output.shape
(3, 1, 5, 6) (3, 1, 5, 6)


Loading…
Cancel
Save