Skip to content

Commit 818dc22

Browse files
authored
Adding log call on giou loss (#5690)
1 parent 0cba9b7 commit 818dc22

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

torchvision/ops/giou_loss.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import torch
22
from torch import Tensor
33

4+
from ..utils import _log_api_usage_once
5+
46

57
def _upcast(t: Tensor) -> Tensor:
68
# Protects from numerical overflows in multiplications by upcasting to the equivalent higher type
@@ -41,6 +43,8 @@ def generalized_box_iou_loss(
4143
A Metric and A Loss for Bounding Box Regression:
4244
https://arxiv.org/abs/1902.09630
4345
"""
46+
if not torch.jit.is_scripting() and not torch.jit.is_tracing():
47+
_log_api_usage_once(generalized_box_iou_loss)
4448

4549
boxes1 = _upcast(boxes1)
4650
boxes2 = _upcast(boxes2)

0 commit comments

Comments
 (0)