import tensorflow as tf
import os
os.environ["CUDA_VISIBLE_DEVICES"]="0"
if tf.test.gpu_device_name():
print('Default GPU Device: {}'.format(tf.test.gpu_device_name()))
else:
print("Please install GPU version of TF")
tf.__version__sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))
print("VERSION", tf.__version__sess)