In [3]:
import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))
In [4]:
sess = tf.Session()
with tf.device('/gpu:0'):
node = tf.constant(3.0)
print(sess.run(node))
In [ ]: