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
ModelZoo
ResNet50_tensorflow
Commits
1f34fcaf
Unverified
Commit
1f34fcaf
authored
Jan 24, 2018
by
Toby Boyd
Committed by
GitHub
Jan 24, 2018
Browse files
Merge pull request #3141 from yaroslavvb/patch-1
assert fails on requesting gpus when not available
parents
5fa2a4e6
6b9d5fba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
tutorials/image/cifar10_estimator/cifar10_main.py
tutorials/image/cifar10_estimator/cifar10_main.py
+2
-0
No files found.
tutorials/image/cifar10_estimator/cifar10_main.py
View file @
1f34fcaf
...
...
@@ -503,6 +503,8 @@ if __name__ == '__main__':
help
=
'Epsilon for batch norm.'
)
args
=
parser
.
parse_args
()
if
args
.
num_gpus
>
0
:
assert
tf
.
test
.
is_gpu_available
(),
"Requested GPUs but none found."
if
args
.
num_gpus
<
0
:
raise
ValueError
(
'Invalid GPU count:
\"
--num-gpus
\"
must be 0 or a positive integer.'
)
...
...
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