Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
818dc22f
Unverified
Commit
818dc22f
authored
Mar 28, 2022
by
Vasilis Vryniotis
Committed by
GitHub
Mar 28, 2022
Browse files
Adding log call on giou loss (#5690)
parent
0cba9b78
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
torchvision/ops/giou_loss.py
torchvision/ops/giou_loss.py
+4
-0
No files found.
torchvision/ops/giou_loss.py
View file @
818dc22f
import
torch
import
torch
from
torch
import
Tensor
from
torch
import
Tensor
from
..utils
import
_log_api_usage_once
def
_upcast
(
t
:
Tensor
)
->
Tensor
:
def
_upcast
(
t
:
Tensor
)
->
Tensor
:
# Protects from numerical overflows in multiplications by upcasting to the equivalent higher type
# Protects from numerical overflows in multiplications by upcasting to the equivalent higher type
...
@@ -41,6 +43,8 @@ def generalized_box_iou_loss(
...
@@ -41,6 +43,8 @@ def generalized_box_iou_loss(
A Metric and A Loss for Bounding Box Regression:
A Metric and A Loss for Bounding Box Regression:
https://arxiv.org/abs/1902.09630
https://arxiv.org/abs/1902.09630
"""
"""
if
not
torch
.
jit
.
is_scripting
()
and
not
torch
.
jit
.
is_tracing
():
_log_api_usage_once
(
generalized_box_iou_loss
)
boxes1
=
_upcast
(
boxes1
)
boxes1
=
_upcast
(
boxes1
)
boxes2
=
_upcast
(
boxes2
)
boxes2
=
_upcast
(
boxes2
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment