When I\'m trying to use TensorFlow with Keras using the gpu, I\'m getting this error message:
C:\\Users\\nicol\\Anaconda3\\envs\\tensorflow\\lib\\site-packag
I ran into this problem when trying to run several servers that use a model to serve predictions. As I wasn't training a model but simply using it, the difference between using GPU or CPU was minor. For this specific case, the issue can be avoided by forcing Tensorflow to use the CPU by "hiding" the GPU.
import os
os.environ["CUDA_VISIBLE_DEVICES"] = "-1" # Force TF to use only the CPU