Commit e2b93e6c authored by Yong Tang's avatar Yong Tang Committed by Rasmus Munk Larsen
Browse files

Fix sample_distorted_bounding_box where min_object_covered could be None (#15531)



* Fix sample_distorted_bounding_box where min_object_covered could be None

This fix tried to address the issue raised in 15529 where
not providing min_object_covered a value will result in
a ValueError. In the docstring, however, min_object_covered
has been described as default to 0.1.

The reason for the issue is that when sample_distorted_bounding_box
switched to V2, min_object_covered has been changed form an attr
to an input. As input could not have a default value,
min_object_covered=None will result in an error.

This fix adds the check so that a default value 0.1 will be
provided if min_object_covered=None.

This fix fixes 15529.

Signed-off-by: default avatarYong Tang <yong.tang.github@outlook.com>

* Add test case for min_object_covered=None with sample_distorted_bounding_box.

Signed-off-by: default avatarYong Tang <yong.tang.github@outlook.com>

* Move min_object_covered = 0.1 to the args

Signed-off-by: default avatarYong Tang <yong.tang.github@outlook.com>

* Update golden API

with
```
bazel-bin/tensorflow/tools/api/tests/api_compatibility_test
           --update_goldens True
```

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