Browse Source

fixed InvertPermutation

tags/v0.5.0-beta
jiangjinsheng 5 years ago
parent
commit
4ff95eab69
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      mindspore/ops/operations/array_ops.py

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

@@ -980,7 +980,7 @@ class InvertPermutation(PrimitiveWithInfer):
validator.check_value_type("shape", x_shp, [tuple, list], self.name) validator.check_value_type("shape", x_shp, [tuple, list], self.name)
if mstype.issubclass_(x['dtype'], mstype.tensor): if mstype.issubclass_(x['dtype'], mstype.tensor):
validator.check('x dimension', len(x_shp), '', 1, Rel.EQ, self.name) validator.check('x dimension', len(x_shp), '', 1, Rel.EQ, self.name)
validator.check_type_same({'x dtype': x['dtype']}, mstype.int_type, self.name)
validator.check_tensor_type_same({'x dtype': x['dtype']}, mstype.int_type, self.name)
x_value = [int(i) for i in x_value.asnumpy()] x_value = [int(i) for i in x_value.asnumpy()]
z = [x_value[i] for i in range(len(x_value))] z = [x_value[i] for i in range(len(x_value))]
z.sort() z.sort()


Loading…
Cancel
Save