"git@developer.sourcefind.cn:change/sglang.git" did not exist on "e0b2d3eebebd3d4efc7e323ad2dee605b607f394"
Unverified Commit 1db87957 authored by Vasilis Vryniotis's avatar Vasilis Vryniotis Committed by GitHub
Browse files

Remove assertions for generalized_box_iou (#5691)

parent b031e917
......@@ -298,12 +298,6 @@ def generalized_box_iou(boxes1: Tensor, boxes2: Tensor) -> Tensor:
"""
if not torch.jit.is_scripting() and not torch.jit.is_tracing():
_log_api_usage_once(generalized_box_iou)
# degenerate boxes gives inf / nan results
# so do an early check
if (boxes1[:, 2:] < boxes1[:, :2]).any():
raise ValueError("Some of the input boxes1 are invalid.")
if not (boxes2[:, 2:] >= boxes2[:, :2]).all():
raise ValueError("Some of the input boxes2 are invalid.")
inter, union = _box_inter_union(boxes1, boxes2)
iou = inter / union
......
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