加载运行时 CuDNN 库:8.0.5,但源代码编译为:8.1.0

ala*_*heh 11 tensorflow

当我运行 model.fit_generator 代码以使用 CNN 模型训练图像时,出现此错误。我不明白这个错误,我该怎么办?谁能帮我?这是完整的错误描述

Loaded runtime CuDNN library: 8.0.5, but the source was compiled with: 8.1.0.  
CuDNN library needs to have a matching major version and equal or higher minor version. If using a binary install, upgrade your CuDNN library.
If building from sources, ensure the library loaded at runtime is compatible with the version specified during compile configuration.
Run Code Online (Sandbox Code Playgroud)

小智 7

我有同样的错误“tensorflow/stream_executor/cuda/cuda_dnn.cc:362]已加载运行时 CuDNN 库:8.0.5,但源代码是用:8.1.0 编译的。” 我通过降级TensorFlow版本解决了这个问题,这里说你使用了与google colab CuDNN版本不兼容的新版本TensorFlow。我使用了 TensorFlow 2.4.0 以及 2.4.0 版本所需的所有依赖项。
这里说的是使用哪个版本的 TensorFlow 来实现 cudnn 兼容性,https://www.tensorflow.org/install/source


Szy*_*cot 1

您应该始终安装与您要使用的版本依赖项相匹配的库版本。

你可以从nvidia网站下载你需要的版本或者使用conda进行包管理。它将为您处理所有依赖项。

您可以使用miniconda并键入conda install -c anaconda tensorflow-gpu来为您排序。如果您需要特定版本的Python,您可以使用它创建环境。