how to check my tensorflow is gpu or cpu code example
Example 1: check if tensorflow gpu is installed
import tensorflow as tf
print(tf.test.gpu_device_name())
Example 2: how to check if tensorflow is working on your pc
>>> print sess.run(hello)
import tensorflow as tf
print(tf.test.gpu_device_name())
>>> print sess.run(hello)