You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix box_iou returning 0 for floating-point results less than 1. #8369 (#8553)
Fixes # 8369
### Description
Fixes an issue where the result of `box_iou` was 0 when the first
argument was an integer, as described in #8369.
IOU values range from 0 to 1. If the first argument is an integer, the
function could return an integer less than 1, resulting in a return
value of 0.
This pull request changes the return type of `box_iou` to `float32`, or
to match the float data type of the first argument.
### Types of changes
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [x] Non-breaking change (fix or new feature that would not break
existing functionality).
- [ ] Integration tests passed locally by running `./runtests.sh -f -u
--net --coverage`.
- [ ] Quick tests passed locally by running `./runtests.sh --quick
--unittests --disttests`.
- [x] In-line docstrings updated.
---------
Signed-off-by: reworld223 <sjiez369@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: YunLiu <55491388+KumoLiu@users.noreply.github.com>
0 commit comments