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
3fd5ea26
Unverified
Commit
3fd5ea26
authored
Dec 01, 2021
by
aldakata
Committed by
GitHub
Dec 01, 2021
Browse files
Explicitly setting torch.cuda.device at init_model (#1056)
parent
c06c0189
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
mmdet3d/apis/inference.py
mmdet3d/apis/inference.py
+1
-0
No files found.
mmdet3d/apis/inference.py
View file @
3fd5ea26
...
...
@@ -65,6 +65,7 @@ def init_model(config, checkpoint=None, device='cuda:0'):
if
'PALETTE'
in
checkpoint
[
'meta'
]:
# 3D Segmentor
model
.
PALETTE
=
checkpoint
[
'meta'
][
'PALETTE'
]
model
.
cfg
=
config
# save the config in the model for convenience
torch
.
cuda
.
set_device
(
device
)
model
.
to
(
device
)
model
.
eval
()
return
model
...
...
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