There are multiple ways for you to check if TensorFlow is detecting a GPU or not. Please try the following and update the question based on which Ill update my answer further.
with tf.Session() as sess:
devices = sess.list_devices()
Also,
from tensorflow.python.client import device_lib
print(device_lib.list_local_devices())
In case you are able to detect the GPU but TensorFlow is not set to it, there may be an issue with your environment variables. There are quite a lot of threads that talk about how to set a GPU for TensorFlow on SO.
From this post -
Using CUDA_VISIBLE_DEVICES environment variable. by setting environment variable CUDA_VISIBLE_DEVICES="1" makes only device 1 visible and by setting CUDA_VISIBLE_DEVICES="0,1" makes devices 0 and 1 visible. You can do this in python by having a line os.environ["CUDA_VISIBLE_DEVICES"]="0,1" after importing os package.
Using with tf.device('/gpu:2') and creating the graph. Then it will use GPU device 2 to run.
Using config = tf.ConfigProto(device_count = {'GPU': 1}) and then sess = tf.Session(config=config). This will use GPU device 1.
Finally, if none of the above solves it, then check this GitHub issue on the official TensorFlow repo. Someone answered here by saying that their issues were resolved after building TensorFlow from source. Here is a link for how to do that.