Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
seminar-breakout
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shashank Suhas
seminar-breakout
Commits
61af56d9
You need to sign in or sign up before continuing.
Commit
61af56d9
authored
Jan 16, 2019
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[MaskRCNN] allow inference with MKL support (#1024)
parent
99565998
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
examples/FasterRCNN/train.py
examples/FasterRCNN/train.py
+3
-1
tensorpack/utils/gpu.py
tensorpack/utils/gpu.py
+1
-1
No files found.
examples/FasterRCNN/train.py
View file @
61af56d9
...
@@ -421,7 +421,9 @@ if __name__ == '__main__':
...
@@ -421,7 +421,9 @@ if __name__ == '__main__':
DetectionDataset
()
# initialize the config with information from our dataset
DetectionDataset
()
# initialize the config with information from our dataset
if
args
.
visualize
or
args
.
evaluate
or
args
.
predict
:
if
args
.
visualize
or
args
.
evaluate
or
args
.
predict
:
assert
tf
.
test
.
is_gpu_available
()
if
not
tf
.
test
.
is_gpu_available
():
from
tensorflow.python.framework
import
test_util
assert
test_util
.
IsMklEnabled
(),
"Inference requires either GPU support or MKL support!"
assert
args
.
load
assert
args
.
load
finalize_configs
(
is_training
=
False
)
finalize_configs
(
is_training
=
False
)
...
...
tensorpack/utils/gpu.py
View file @
61af56d9
...
@@ -44,7 +44,7 @@ def get_num_gpu():
...
@@ -44,7 +44,7 @@ def get_num_gpu():
return
ret
return
ret
env
=
os
.
environ
.
get
(
'CUDA_VISIBLE_DEVICES'
,
None
)
env
=
os
.
environ
.
get
(
'CUDA_VISIBLE_DEVICES'
,
None
)
if
env
is
not
None
:
if
env
:
return
warn_return
(
len
(
env
.
split
(
','
)),
"Found non-empty CUDA_VISIBLE_DEVICES. "
)
return
warn_return
(
len
(
env
.
split
(
','
)),
"Found non-empty CUDA_VISIBLE_DEVICES. "
)
output
,
code
=
subproc_call
(
"nvidia-smi -L"
,
timeout
=
5
)
output
,
code
=
subproc_call
(
"nvidia-smi -L"
,
timeout
=
5
)
if
code
==
0
:
if
code
==
0
:
...
...
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