Skip to content

Instantly share code, notes, and snippets.

@heartonbit
Created November 14, 2019 20:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save heartonbit/2e760942a297cc43dc3757e56d6376ed to your computer and use it in GitHub Desktop.
Save heartonbit/2e760942a297cc43dc3757e56d6376ed to your computer and use it in GitHub Desktop.
device_name = tf.test.gpu_device_name()
if device_name != '/device:GPU:0':
raise SystemError('GPU device not found')
print('Found GPU at: {}'.format(device_name))
print("GPU Available: ", tf.test.is_gpu_available())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment