"vscode:/vscode.git/clone" did not exist on "64ad63cd8413811230c6421bd5d4c7bfd560c46b"
Unverified Commit 5a1d2722 authored by Yaroslav Bulatov's avatar Yaroslav Bulatov Committed by GitHub
Browse files

assert fails on requesting gpus when not available

parent aeb8cfcb
......@@ -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.')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment