diff --git a/mindspore/ops/operations/array_ops.py b/mindspore/ops/operations/array_ops.py index 399972ddf4..77b07210c6 100644 --- a/mindspore/ops/operations/array_ops.py +++ b/mindspore/ops/operations/array_ops.py @@ -807,7 +807,7 @@ class GatherV2(PrimitiveWithCheck): def __check__(self, params, indices, axis): validator.check_subclass("params", params['dtype'], mstype.tensor, self.name) validator.check_tensor_dtype_valid("indices", indices['dtype'], mstype.int_type, self.name) - validator.check_subclass("axis", axis['dtype'], [mstype.tensor, mstype.int_], self.name) + validator.check_subclass("axis", axis['dtype'], [mstype.int_], self.name) class SparseGatherV2(GatherV2):