“Failed to get convolution algorithm. This is probably because cuDNN failed to initialize”

You’ve recently been using the version of inf.0. The following error occurred while running the program.

Failed to get convolution algorithm. This is probably because cuDNN failed to initialize

At first, it was suspected that CUDA and cudnn were configured incorrectly (version matching is required). After trial and error, there is still this error

from tensorflow.compat.v1 import ConfigProto
from tensorflow.compat.v1 import InteractiveSession

config = ConfigProto()
config.gpu_options.allow_growth = True
session = InteractiveSession(config=config)

It means to allocate GPUs on demand
the main reason is that my image is relatively large and consumes more GPU resources. But my graphics card (rtx2060) has only 6GB memory, so this error will appear. This error prompt is very misleading, which makes people obsess about the versions of CUDA and cudnn. Therefore, I’ll stick it here to prevent future generations from repeating the same mistakes.


reference resources:

https://github.com/tensorflow/tensorflow/issues/24828

Similar Posts: