adapt crop and resize op check

This commit is contained in:
wuxuejian 2020-07-09 10:35:16 +08:00
parent 44269cd288
commit 5759a13077
1 changed files with 2 additions and 2 deletions

View File

@ -117,8 +117,8 @@ class CropAndResize(PrimitiveWithInfer):
validator.check("crop_height", crop_size_value[0], "minimum", 0, Rel.GT, self.name)
validator.check("crop_width", crop_size_value[1], "minimum", 0, Rel.GT, self.name)
# check crop_size element type
validator.check("crop_height dtype", crop_size_dtype[0], mstype.int32, self.name)
validator.check("crop_width dtype", crop_size_dtype[1], mstype.int32, self.name)
validator.check("crop_height dtype", crop_size_dtype[0], "expected", mstype.int32, Rel.EQ, self.name)
validator.check("crop_width dtype", crop_size_dtype[1], "expected", mstype.int32, Rel.EQ, self.name)
num_boxes = boxes_shape[0]
crop_height = crop_size_value[0]