Skip to content

check inf value for computing iou #3385

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

developer0hye
Copy link
Contributor

@developer0hye developer0hye commented Feb 12, 2021

While investigating a numeric overflow at #3371, I noticed that the implementations of _box_inter_union() need to check inter and union value.

Actually, when the type of boxes is torch.float16, overflow easily happens.

I expect we can easily check the error with this assert code.

check inf value for computing iou
@datumbox
Copy link
Contributor

@developer0hye Thanks for investigating and confirming the issue.

The issue is caused indeed by numeric overflows on types that use very few bytes (such as float16). I have already submitted PR #3383 which does not just assert but addresses the issue on Python and CUDA side.

@developer0hye
Copy link
Contributor Author

developer0hye commented Feb 12, 2021

@datumbox
I checked your pr! Thanks!

This pr is the subset of your pr, right??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants