呜呜呜呜呜呜花了好几天这个破环境终于解决了。
报错:Loaded runtime CuDNN library: 8.0.5 but source was compiled with: 8.1.0. CuDNN library needs to have matching major version and equal or higher minor version. If using a binary install, upgrade your CuDNN library. If building from sources, make sure the library loaded at runtime is compatible with
the version specified during compile configuration.
解决方法:将pytorch和tensorflow共同用到的CuDNN版本匹配一致。将pytorch升级到8.1.0后系统还是报错,一直检测不到新升级的CuDNN,环境配置也改了。最后将tensorflow所用到的CuDNN降到8.0.5解决上述问题。
查看对应版本:2022最新:TensorFlow各个GPU版本CUDA和cuDNN对应版本整理(最简洁)_hi_1900的博客-CSDN博客_tensorflowgpu版本对应关系
我的环境为:python3.6+pytorch1.9.0 + cuda11.1+cuDNN v8.0.5 + tensorflow2.4.0+tensorflow_gpu-2.4.0
安装命令:
pip install torch==1.9.1+cu111 torchvision==0.10.1+cu111 torchaudio==0.9.1 -f https://download.pytorch.org/whl/torch_stable.html
pip install tensorflow==2.4.0
pip install tensorflow-gpu==2.4.0