Commit 16f35a75 authored by Valentin Andrei's avatar Valentin Andrei Committed by Facebook GitHub Bot
Browse files

Relax bounding box check assertion for FP16

Reviewed By: stephenyan1231

Differential Revision: D30827134

fbshipit-source-id: e0fcb3b5f62d52283c08870dc9062c2086faf163
parent b9aa4855
...@@ -48,7 +48,7 @@ def generalized_box_iou(boxes1, boxes2): ...@@ -48,7 +48,7 @@ def generalized_box_iou(boxes1, boxes2):
""" """
# degenerate boxes gives inf / nan results # degenerate boxes gives inf / nan results
# so do an early check # so do an early check
assert (boxes1[:, 2:] > boxes1[:, :2]).all(), f"incorrect boxes, boxes1 {boxes1}" assert (boxes1[:, 2:] >= boxes1[:, :2]).all(), f"incorrect boxes, boxes1 {boxes1}"
assert (boxes2[:, 2:] > boxes2[:, :2]).all(), f"incorrect boxes, boxes2 {boxes2}" assert (boxes2[:, 2:] > boxes2[:, :2]).all(), f"incorrect boxes, boxes2 {boxes2}"
iou, union = box_iou(boxes1, boxes2) iou, union = box_iou(boxes1, boxes2)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment