We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0cba9b7 commit 818dc22Copy full SHA for 818dc22
torchvision/ops/giou_loss.py
@@ -1,6 +1,8 @@
1
import torch
2
from torch import Tensor
3
4
+from ..utils import _log_api_usage_once
5
+
6
7
def _upcast(t: Tensor) -> Tensor:
8
# Protects from numerical overflows in multiplications by upcasting to the equivalent higher type
@@ -41,6 +43,8 @@ def generalized_box_iou_loss(
41
43
A Metric and A Loss for Bounding Box Regression:
42
44
https://arxiv.org/abs/1902.09630
45
"""
46
+ if not torch.jit.is_scripting() and not torch.jit.is_tracing():
47
+ _log_api_usage_once(generalized_box_iou_loss)
48
49
boxes1 = _upcast(boxes1)
50
boxes2 = _upcast(boxes2)
0 commit comments