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
07fb8ba7
Unverified
Commit
07fb8ba7
authored
Apr 08, 2021
by
Vasilis Vryniotis
Committed by
GitHub
Apr 08, 2021
Browse files
Add missing device info. (#3651)
parent
ad9cc62a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
torchvision/models/detection/retinanet.py
torchvision/models/detection/retinanet.py
+2
-1
No files found.
torchvision/models/detection/retinanet.py
View file @
07fb8ba7
...
@@ -386,7 +386,8 @@ class RetinaNet(nn.Module):
...
@@ -386,7 +386,8 @@ class RetinaNet(nn.Module):
matched_idxs
=
[]
matched_idxs
=
[]
for
anchors_per_image
,
targets_per_image
in
zip
(
anchors
,
targets
):
for
anchors_per_image
,
targets_per_image
in
zip
(
anchors
,
targets
):
if
targets_per_image
[
'boxes'
].
numel
()
==
0
:
if
targets_per_image
[
'boxes'
].
numel
()
==
0
:
matched_idxs
.
append
(
torch
.
full
((
anchors_per_image
.
size
(
0
),),
-
1
,
dtype
=
torch
.
int64
))
matched_idxs
.
append
(
torch
.
full
((
anchors_per_image
.
size
(
0
),),
-
1
,
dtype
=
torch
.
int64
,
device
=
anchors_per_image
.
device
))
continue
continue
match_quality_matrix
=
box_ops
.
box_iou
(
targets_per_image
[
'boxes'
],
anchors_per_image
)
match_quality_matrix
=
box_ops
.
box_iou
(
targets_per_image
[
'boxes'
],
anchors_per_image
)
...
...
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