Skip to content

Instantly share code, notes, and snippets.

@heartonbit
Created November 14, 2019 20:51
Show Gist options
  • Select an option

  • Save heartonbit/2e760942a297cc43dc3757e56d6376ed to your computer and use it in GitHub Desktop.

Select an option

Save heartonbit/2e760942a297cc43dc3757e56d6376ed to your computer and use it in GitHub Desktop.

Revisions

  1. heartonbit created this gist Nov 14, 2019.
    5 changes: 5 additions & 0 deletions tf_check_gpu
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    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())