Commit 4d9645a6 authored by Yong Tang's avatar Yong Tang Committed by Jonathan Hseu
Browse files

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: default avatarYong Tang <yong.tang.github@outlook.com>

* Adjust shape to pass the test.

Signed-off-by: default avatarYong 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: default avatarYong Tang <yong.tang.github@outlook.com>
parent b3b5d4f0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment