提交 03ef509e 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!2956 adapt crop and resize op check

Merge pull request !2956 from wuxuejian/crop_op_check
......@@ -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]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册