From 933ef6701a1c4ba157534ee4f217e808496f853c Mon Sep 17 00:00:00 2001 From: jiangjinsheng Date: Thu, 28 May 2020 11:22:35 +0800 Subject: [PATCH 1/3] fixed doc for ArgMaxWithValue --- mindspore/ops/operations/array_ops.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mindspore/ops/operations/array_ops.py b/mindspore/ops/operations/array_ops.py index 16f5121e65..e23a242820 100644 --- a/mindspore/ops/operations/array_ops.py +++ b/mindspore/ops/operations/array_ops.py @@ -1105,9 +1105,11 @@ class ArgMaxWithValue(PrimitiveWithInfer): :math:`(x_1, x_2, ..., x_N)`. Outputs: - Tensor, corresponding index and maximum value of input tensor. If `keep_dims` is true, the output tensors shape + tuple(Tensor), tuple of 2 tensors, corresponding index and maximum value of input tensor. + - index (Tensor) - The index for maximum value of input tensor. If `keep_dims` is true, the output tensors shape is :math:`(x_1, x_2, ..., x_{axis-1}, 1, x_{axis+1}, ..., x_N)`. Else, the shape is :math:`(x_1, x_2, ..., x_{axis-1}, x_{axis+1}, ..., x_N)`. + - output_x (Tensor) - The maximum value of input tensor, the shape same as index. Examples: >>> input_x = Tensor(np.random.rand(5)) From 7aa5e7f3c3c6a44ebec6b06182d13977f43aa2db Mon Sep 17 00:00:00 2001 From: jiangjinsheng Date: Thu, 28 May 2020 11:44:16 +0800 Subject: [PATCH 2/3] fixed BatchNorm --- mindspore/ops/operations/nn_ops.py | 1 - 1 file changed, 1 deletion(-) diff --git a/mindspore/ops/operations/nn_ops.py b/mindspore/ops/operations/nn_ops.py index 6552d9f47c..a58a4582fd 100644 --- a/mindspore/ops/operations/nn_ops.py +++ b/mindspore/ops/operations/nn_ops.py @@ -613,7 +613,6 @@ class BatchNorm(PrimitiveWithInfer): - **updated_bias** (Tensor) - Tensor of shape :math:`(C,)`. - **reserve_space_1** (Tensor) - Tensor of shape :math:`(C,)`. - **reserve_space_2** (Tensor) - Tensor of shape :math:`(C,)`. - - **reserve_space_3** (Tensor) - Tensor of shape :math:`(C,)`. Examples: >>> input_x = Tensor(np.ones([128, 64, 32, 64]), mindspore.float32) From a243dc9ea3d9d5967a4f5fe57ac496fb7c3b3351 Mon Sep 17 00:00:00 2001 From: jiangjinsheng Date: Thu, 28 May 2020 15:06:47 +0800 Subject: [PATCH 3/3] fixed doc for ScatterMax --- mindspore/ops/operations/array_ops.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mindspore/ops/operations/array_ops.py b/mindspore/ops/operations/array_ops.py index e23a242820..74fd3c3b3e 100644 --- a/mindspore/ops/operations/array_ops.py +++ b/mindspore/ops/operations/array_ops.py @@ -2163,7 +2163,7 @@ class ScatterMax(PrimitiveWithInfer): Tensor, has the same shape and data type as `input_x`. Examples: - >>> input_x = Tensor(np.array([[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]]), mindspore.float32) + >>> input_x = Parameter(Tensor(np.array([[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]]), mindspore.float32), name="input_x") >>> indices = Tensor(np.array([[0, 0], [1, 1]]), mindspore.int32) >>> update = Tensor(np.ones([2, 2, 3]) * 88, mindspore.float32) >>> scatter_max = P.ScatterMax()