import tensorflow as tf tf.test.gpu_device_name() print('Default GPU Device: {}'.format(tf.test.gpu_device_name()))