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
mmdetection3d
Commits
b0e8ece9
"src/rpc/vscode:/vscode.git/clone" did not exist on "8f0df39ee106efb665af90c61dddfdfbf4899991"
Unverified
Commit
b0e8ece9
authored
Oct 18, 2023
by
LRJKD
Committed by
GitHub
Oct 18, 2023
Browse files
[Fix] Fix support for devices other than Cuda in FreeAnchor3DHead (#2769)
parent
0f9dfa97
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
mmdet3d/models/dense_heads/free_anchor3d_head.py
mmdet3d/models/dense_heads/free_anchor3d_head.py
+4
-1
No files found.
mmdet3d/models/dense_heads/free_anchor3d_head.py
View file @
b0e8ece9
...
...
@@ -2,6 +2,7 @@
from
typing
import
Dict
,
List
import
torch
from
mmengine.device
import
get_device
from
torch
import
Tensor
from
torch.nn
import
functional
as
F
...
...
@@ -79,7 +80,9 @@ class FreeAnchor3DHead(Anchor3DHead):
featmap_sizes
=
[
featmap
.
size
()[
-
2
:]
for
featmap
in
cls_scores
]
assert
len
(
featmap_sizes
)
==
self
.
prior_generator
.
num_levels
anchor_list
=
self
.
get_anchors
(
featmap_sizes
,
batch_input_metas
)
device
=
get_device
()
anchor_list
=
self
.
get_anchors
(
featmap_sizes
,
batch_input_metas
,
device
)
mlvl_anchors
=
[
torch
.
cat
(
anchor
)
for
anchor
in
anchor_list
]
# concatenate each level
...
...
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