how to check if the code is running on the gpu or not in tensorflow code example
Example: check if tensorflow gpu is installed
import tensorflow as tf
print(tf.test.gpu_device_name())
import tensorflow as tf
print(tf.test.gpu_device_name())