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

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

I’m confused by this error because I installed DLC and tensorflow with CPU support, but when I run my program, I get this error. This error is being thrown in the train_network() function. Does anyone have an idea on how I could fix it?

Can you give more details, i.e. Windows/MacOS/ubuntu; which version of Tensorflow and DLC, are you using the environments provided here: www.deeplabcut.org?

i.e. you can look by:

import tensorflow
tensorflow.__version__

import deeplabcut
deeplabcut.__version__

also see: https://github.com/tensorflow/tensorflow/issues/24828#issuecomment-457425190

Thanks for the replies! I figured out that even though I followed the DLC installation for tensorflow CPU, the GPU version was being installed by default so I uninstalled it and reinstalled it specifiying the CPU version. Thank you!

1 Like

Same issue. My laptop runs Win10pro and have an RTX 2060.

deeplabcut.__version ‘2.1.6.2’
tensorflow.version ‘1.13.1’

Name Version Build Channel

cudnn 7.6.5 cuda10.0_0

I use the install: conda env create -f DLC-GPU.yaml to install DLC
Cuda Driver Version: 442.59

UnknownError: 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 resnet_v1_50/conv1/Conv2D (defined at C:\Users\Anaconda3\envs\DLC-GPU\lib\site-packages\deeplabcut\pose_estimation_tensorflow\nnet\pose_net.py:52) ]]
[[node sigmoid_cross_entropy_loss/value (defined at C:\Users\Anaconda3\envs\DLC-GPU\lib\site-packages\deeplabcut\pose_estimation_tensorflow\nnet\pose_net.py:162) ]]

Hi Pedro,

you’re driver is likely incorrect, as you need to use CUDA ( or maximally CUDA 10.0; i.e. 442.59 would be for 10+, whereas on our website we suggest 384.XX:https://github.com/AlexEMG/DeepLabCut/blob/master/docs/installation.md#step-2-easy-install-for-windows-macos-ubuntu-please-use-our-supplied-anaconda-environments

Thanks for the response. My lab’s desktop PC has installed an RTX 2080, Win10pro, DLC 2.0.8, Cuda Driver 436.15, Cuda 10.0.13, and cudnn 7.6.5. No problem with this machine.

In my laptop, I reinstalled the same DLC version and Cuda drivers as on my desktop. The only difference is that my laptop has an RTX 2060. I still have the same problem that I mentioned earlier. I tried to get an older Cuda driver but the older version that I can get is version 436. I’m able to run import tensorflow as tf sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))

Also check out this: https://github.com/tensorflow/tensorflow/issues/24828

Also, if you are testing by running a session and hen immediately trying dlc, the session is still running, and could cause this,

Please also:

tf.sess.close()