Browse Source

!2956 adapt crop and resize op check

Merge pull request !2956 from wuxuejian/crop_op_check
tags/v0.6.0-beta
mindspore-ci-bot Gitee 5 years ago
parent
commit
03ef509ee9
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      mindspore/ops/operations/image_ops.py

+ 2
- 2
mindspore/ops/operations/image_ops.py 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]


Loading…
Cancel
Save