Skip to content

Instantly share code, notes, and snippets.

@anujonthemove
Created December 17, 2022 01:26
Show Gist options
  • Save anujonthemove/4b5ec16797e5e64a822d67826301bedf to your computer and use it in GitHub Desktop.
Save anujonthemove/4b5ec16797e5e64a822d67826301bedf to your computer and use it in GitHub Desktop.
Check if TensorFlow can access GPU
import tensorflow as tf
from tensorflow.python.client import device_lib
print(tf.test.is_gpu_available())
print(tf.config.experimental.list_physical_devices('GPU'))
print(device_lib.list_local_devices())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment