from keras import backend as K K.tensorflow_backend._get_available_gpus()
from tensorflow.python.client import device_lib import tensorflow as tf print(device_lib.list_local_devices()) print(tf.test.is_built_with_cuda())
import tensorflow as tf
print (tf.__version__)
if tf.test.gpu_device_name():
print('Default GPU Device: {}'.format(tf.test.gpu_device_name()))
else:
print("Please install GPU version of TF")