import tensorflow as tf tf.test.gpu_device_name() # Bash # $ CUDNN_H_PATH=$(whereis cudnn.h) #$ cat ${CUDNN_H_PATH} | grep CUDNN_MAJOR
import tensorflow as tf print("Num GPUs Available: ", len(tf.config.list_physical_devices('GPU')))