Browse Source

Fix in changing from GatherV2 to Gather

tags/v1.2.0-rc1
l00591931 4 years ago
parent
commit
9bcd6fb378
2 changed files with 2 additions and 1 deletions
  1. +1
    -1
      mindspore/core/abstract/prim_arrays.cc
  2. +1
    -0
      mindspore/ops/operations/array_ops.py

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

@@ -612,7 +612,7 @@ AbstractBasePtr InferImplGatherV2(const AnalysisEnginePtr &, const PrimitivePtr
ShapeVector indices_shp_max = (ind_dyn) ? indices->shape()->max_shape() : indices->shape()->shape();
// check axis_val within interval: [-params_rank, params_rank)
if (!(-params_rank <= axis_val) || !(axis_val < params_rank)) {
MS_LOG(EXCEPTION) << "For GatherV2 - Axis value must be within [ " << -params_rank << ", " << params_rank << " ) "
MS_LOG(EXCEPTION) << "For Gather - Axis value must be within [ " << -params_rank << ", " << params_rank << " ) "
<< "Got " << axis_val << ".";
}
if (axis_val < 0) {


+ 1
- 0
mindspore/ops/operations/array_ops.py View File

@@ -25,6 +25,7 @@ import numbers

import numpy as np

from mindspore import log as logger
from .._utils import get_concat_offset
from ..operations.math_ops import _infer_shape_reduce
from ..primitive import Primitive, PrimitiveWithInfer, PrimitiveWithCheck, prim_attr_register, _run_op


Loading…
Cancel
Save