I was trying to fit my model into history, but my code didn't work. The initial error was
"Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was printed above.
[[node sequential/conv2d/Conv2D (defined at <ipython-input-10-fe8518c345fd>:1) ]] [Op:__inference_train_function_675]"
Then I tried using this code to reduce the memory
from keras.backend.tensorflow_backend import set_session
physical_devices = tf.config.experimental.list_physical_devices('GPU')
assert len(physical_devices) > 0, "Not enough GPU hardware devices available"
config = tf.config.experimental.set_memory_growth(physical_devices[0], True)
sess = tf.Session(config=config)
set_session(sess)
Then I got
ImportError: cannot import name 'get_config' from 'tensorflow.python.eager.context' (C:\Users\USER\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\eager\context.py)
Please help, I've been stuck in this hell for so long.
Version I am using:
python 3.8
tensorflow-gpu 2.4.1
cuda_11.2.2_461.33_win10
cudnn-11.2-windows-x64-v8.1.1.33