问题Could not load dynamic library ‘cudnn64_7.dll‘; dlerror: cudnn64_7.dll not found

 2022-10-09 10:24:56.888773: W  tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cudnn64_7.dll'; dlerror: cudnn64_7.dll not found
2022-10-09 10:24:56.888866: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1592] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.
Skipping registering GPU devices...
2022-10-09 10:24:56.889244: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
2022-10-09 10:24:56.889684: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1096] Device interconnect StreamExecutor with strength 1 edge matrix:
2022-10-09 10:24:56.889774: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1102]  

解决方案1:下载对应CUDNN版本

首先需要检查 CUDNN版本是否下载正确

作者个人CUDA下载是10.1,官网cuDNN Archive | NVIDIA Developer显示有多种版本可以选择,此处报错提示建议选择CUDNN7.x.x,或将版本变更为7.x.x

 解决方案2:检查CUDNN7.x.x路径是否加入环境变量Path中

 执行解决方案1后发现问题没有被解决,需要检查CUDNN7.x.x路径是否全部存入环境变量

C:\Program Files\NVIDIA GPU Computing Toolkit\CUDNN\v7.6.5\bin
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDNN\v7.6.5\include
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDNN\v7.6.5\lib\x64

当然如果将CUDNN7.x.x的文件放在CUDA对应文件夹下就不会出现此问题。但需要补充的是,在这个情况下,CUDA目录下的lib文件路径没有添加在环境变量中,需要手动添加

然后问题就被解决了!

2022-10-09 12:07:00.872330: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudnn64_7.dll

你可能感兴趣的:(环境问题,开发环境,Anaconda,PyChram)