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
f7cf2bb0
Commit
f7cf2bb0
authored
May 12, 2020
by
yinchimaoliang
Browse files
add gpu detection
parent
df186989
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
tests/test_scannet_dataset.py
tests/test_scannet_dataset.py
+3
-0
No files found.
tests/test_scannet_dataset.py
View file @
f7cf2bb0
import
numpy
as
np
import
numpy
as
np
import
pytest
import
torch
import
torch
from
mmdet3d.datasets.scannet_dataset
import
ScannetDataset
from
mmdet3d.datasets.scannet_dataset
import
ScannetDataset
...
@@ -72,6 +73,8 @@ def test_getitem():
...
@@ -72,6 +73,8 @@ def test_getitem():
def
test_evaluate
():
def
test_evaluate
():
if
not
torch
.
cuda
.
is_available
():
pytest
.
skip
()
root_path
=
'./tests/data/scannet'
root_path
=
'./tests/data/scannet'
ann_file
=
'./tests/data/scannet/scannet_infos.pkl'
ann_file
=
'./tests/data/scannet/scannet_infos.pkl'
scannet_dataset
=
ScannetDataset
(
root_path
,
ann_file
)
scannet_dataset
=
ScannetDataset
(
root_path
,
ann_file
)
...
...
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