【tensorflow】Could not load dynamic library ‘cudnn64_8.dll‘; dlerror: cudnn64_8.dll not found

报错:

2021-12-28 22:23:20.064116: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library ‘cudart64_110.dll’; dlerror: cudart64_110.dll not found
2021-12-28 22:23:20.066769: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library ‘cublas64_11.dll’; dlerror: cublas64_11.dll not found
2021-12-28 22:23:20.069316: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library ‘cublasLt64_11.dll’; dlerror: cublasLt64_11.dll not found
2021-12-28 22:23:20.071758: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library ‘cufft64_10.dll’; dlerror: cufft64_10.dll not found
2021-12-28 22:23:20.074131: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library ‘curand64_10.dll’; dlerror: curand64_10.dll not found
2021-12-28 22:23:20.076608: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library ‘cusolver64_11.dll’; dlerror: cusolver64_11.dll not found
2021-12-28 22:23:20.078977: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library ‘cusparse64_11.dll’; dlerror: cusparse64_11.dll not found
2021-12-28 22:23:20.081357: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library ‘cudnn64_8.dll’; dlerror: cudnn64_8.dll not found

解决方案1:

各种DLL文件下载官网:
https://www.dll-files.com/search/
下载好缺失的ddl文件,再复制到C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\bin下面。

解决方案2:

因为我的本机是1050ti,然后安装的CUDA10.1,版本较老,然后却装了最新的tensorflow-gpu-2.7.0,所以卸载了重装了2.2.0的。
快速安装的方法:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ --upgrade tensorflow-gpu==2.2.0

降低tensorflow版本为2.2.0,降低keras为2.3.1
重启pycharm!!!然后就解决了。

你可能感兴趣的:(c#,visual,studio,javascript)