简体   繁体   中英

cuDNN failed to initialize

tensorflow.python.framework.errors_impl.UnknownError: 2 root error(s) found.
  (0) Unknown: 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 conv2d_1/convolution}}]]
     [[norm_dense_1/Softmax/_3605]]
  (1) Unknown: 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 conv2d_1/convolution}}]]

This error was encountered when trying to run a project from Github.I have tried reinstalling all the programs from scratch in a new conda environment. Can't seem to figure out whats the problem.

GPU Zotac gtx 1070 ti

My current software installation is as follows:-

  • Python 3.6
  • Tensorflow GPU 1.15
  • CUDA 10
  • cuDNN 7.4

Ensure you have CUDA Toolkit 7.5 Please open a new session then just try to load tensorflow

Are you able to load tensorflow without any error? Make sure all the ddl cudard64_101.ddl and others are loading. If there are no issues with tensorflow then run the following

physical_devices = tf.config.list_physical_devices('GPU')
tf.config.experimental.set_memory_growth(physical_devices[0], True)

Once done try running code again

I had the same output. The problem for me was that i had accidentally set two different environment variables for cuda. The PATH had 2 locations for cuda folder and that caused the problem for me. Removing one of them solved the problem for me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM