Browse Source

!14904 Fix codex and index_add doc text, master branch

From: @tom__chen
Reviewed-by: @pandoublefeng,@robingrosman
Signed-off-by: @pandoublefeng
pull/14904/MERGE
mindspore-ci-bot Gitee 4 years ago
parent
commit
2cf38aead8
2 changed files with 6 additions and 6 deletions
  1. +1
    -1
      mindspore/core/abstract/prim_nn.cc
  2. +5
    -5
      mindspore/ops/operations/math_ops.py

+ 1
- 1
mindspore/core/abstract/prim_nn.cc View File

@@ -296,7 +296,7 @@ AbstractBasePtr InferImplConv2D(const AnalysisEnginePtr &, const PrimitivePtr &p
CheckShapeAnyAndPositive(op_name + " w_shape", w_shape); CheckShapeAnyAndPositive(op_name + " w_shape", w_shape);
CheckShapeAllPositive(op_name + " w_min_shape", w_min_shape); CheckShapeAllPositive(op_name + " w_min_shape", w_min_shape);
CheckShapeAllPositive(op_name + " w_max_shape", w_max_shape); CheckShapeAllPositive(op_name + " w_max_shape", w_max_shape);
int64_t n_axis = 0;
const int64_t n_axis = 0;
int64_t c_axis = 1; int64_t c_axis = 1;
int64_t h_axis = 2; int64_t h_axis = 2;
int64_t w_axis = 3; int64_t w_axis = 3;


+ 5
- 5
mindspore/ops/operations/math_ops.py View File

@@ -4542,11 +4542,11 @@ class IndexAdd(PrimitiveWithInfer):
Inputs: Inputs:
- **input_x** (Parameter) - The input tensor to add to, with data type float64, float32, float16, int32, int16, - **input_x** (Parameter) - The input tensor to add to, with data type float64, float32, float16, int32, int16,
int8, uint8. int8, uint8.
- **indices** (Tensor) - The index of `input_x` on the `axis`th dimension to add to, with data type int32.
The `indices` must be 1D with the same size as the size of the `axis`th dimension of `input_y`. The values
of `indices` should be in the range of 0 to the size of the `axis`th dimension of `input_x`.
- **indices** (Tensor) - The index of `input_x` on the `axis` th dimension to add to, with data type int32.
The `indices` must be 1D with the same size as the size of the `axis` th dimension of `input_y`. The values
of `indices` should be in the range of 0 to the size of the `axis` th dimension of `input_x`.
- **input_y** (Tensor) - The input tensor with the value to add. Must have same data type as `input_x`. - **input_y** (Tensor) - The input tensor with the value to add. Must have same data type as `input_x`.
The shape must be the same as `input_x` except the `axis`th dimension.
The shape must be the same as `input_x` except the `axis` th dimension.


Outputs: Outputs:
Tensor, has the same shape and dtype as input_x. Tensor, has the same shape and dtype as input_x.
@@ -4558,7 +4558,7 @@ class IndexAdd(PrimitiveWithInfer):
ValueError: If axis is out of `input_x` rank's range. ValueError: If axis is out of `input_x` rank's range.
ValueError: If `input_x` rank is not the same as `input_y` rank. ValueError: If `input_x` rank is not the same as `input_y` rank.
ValueError: If size of `indices` is not equal to dimension of y[axis]. ValueError: If size of `indices` is not equal to dimension of y[axis].
ValueError: If `input_y`'s shape is not the same as `input_x` except the `axis`th dimension.
ValueError: If `input_y`'s shape is not the same as `input_x` except the `axis` th dimension.


Supported Platforms: Supported Platforms:
``GPU`` ``GPU``


Loading…
Cancel
Save