System Description
Cuda 11.2
GeForce GTX 1080ti
tensorflow version 2.4.1
keras version 2.2.0
python version 3.8
I was getting the below error when I try to run my code on the GPU.
ModuleNotFoundError: No module named 'tensorflow.keras.backend.tensorflow_backend'
Although the code runs when I try to run it using Keras backend without using the TensorFlow, it only runs on the CPU, not GPU.
Solved the problem
I solved the problem by installing the TensorFlow version of a GPU
pip install tensorflow-gpu
Alternatively, you can try
pip install tensorflow-gpu --user