Improve shape function of SampleDistortedBoundingBox and fix some test cases (#16870)
* Update test case to expose the issue of sample_distorted_bounding_box This commit expoes the issue of sample_distorted_bounding_box, as shape function does not check the ranking like inside Compute(). Signed-off-by:Yong Tang <yong.tang.github@outlook.com> * Adjust shape to pass the test. Signed-off-by:
Yong Tang <yong.tang.github@outlook.com> * Improve shape function of SampleDistortedBoundingBox and fix some test cases This fix tries to improve the shape function of SampleDistortedBoundingBox and fix several test case issues. As is shown in the kernel of SampleDistortedBoundingBox, the shape of SampleDistortedBoundingBox are required to be 1-D `[height, width, channels]` for image_size, 3-D with shape `[batch, N, 4]` for bounding_boxes. In the test case, the uses shape is incorrect but becasue of no check in shape function, the test case passes. This fix adds the shape check for SampleDistortedBoundingBox, and fixes the incorrect test cases. Signed-off-by:
Yong Tang <yong.tang.github@outlook.com>
Loading
Please sign in to comment