加载运行时 CuDNN 库:7.0.5 但源代码是使用 7.2.1 编译的。

加载运行时 CuDNN 库:7.0.5 但源代码是使用 7.2.1 编译的。

我该如何解决这个错误?

$ python tensorboard_viz.py
/scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
2018-10-24 19:49:39.925967: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2018-10-24 19:49:40.093637: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1411] Found device 0 with properties: 
name: GeForce GTX 1080 Ti major: 6 minor: 1 memoryClockRate(GHz): 1.6705
pciBusID: 0000:05:00.0
totalMemory: 10.92GiB freeMemory: 10.03GiB
2018-10-24 19:49:40.238084: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1411] Found device 1 with properties: 
name: GeForce GTX 1080 Ti major: 6 minor: 1 memoryClockRate(GHz): 1.6705
pciBusID: 0000:06:00.0
totalMemory: 10.92GiB freeMemory: 10.76GiB
2018-10-24 19:49:40.238960: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1490] Adding visible gpu devices: 0, 1
2018-10-24 19:49:41.287661: I tensorflow/core/common_runtime/gpu/gpu_device.cc:971] Device interconnect StreamExecutor with strength 1 edge matrix:
2018-10-24 19:49:41.287712: I tensorflow/core/common_runtime/gpu/gpu_device.cc:977]      0 1 
2018-10-24 19:49:41.287733: I tensorflow/core/common_runtime/gpu/gpu_device.cc:990] 0:   N Y 
2018-10-24 19:49:41.287748: I tensorflow/core/common_runtime/gpu/gpu_device.cc:990] 1:   Y N 
2018-10-24 19:49:41.288287: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1103] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 9694 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1080 Ti, pci bus id: 0000:05:00.0, compute capability: 6.1)
2018-10-24 19:49:41.434704: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1103] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:1 with 10405 MB memory) -> physical GPU (device: 1, name: GeForce GTX 1080 Ti, pci bus id: 0000:06:00.0, compute capability: 6.1)
2018-10-24 19:49:44.406950: E tensorflow/stream_executor/cuda/cuda_dnn.cc:343] Loaded runtime CuDNN library: 7.0.5 but source was compiled with: 7.2.1.  CuDNN library major and minor version needs to match or have higher minor version in case of CuDNN 7.0 or later 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.
Segmentation fault

您能提供正确的命令吗?

答案1

我遇到了同样的问题,下面的方法很有效

pip3 uninstall tensorflow-gpu

pip3 install tensorflow-gpu==1.9.0

注意:我使用“pip3”是因为我使用的是 python-3.x,如果你使用的是 python-2.x,则可以改用“pip”

答案2

我遇到了同样的问题,并通过安装回溯中建议的 CuDNN 库解决了该问题(已加载运行时 cuDNN 库:7.0.5,但源代码是使用 7.2.1 编译的。)

我将 cuDNN 版本替换为 cuDNN v7.2.1(2018 年 8 月 7 日),适用于 CUDA 9.2,对我来说很管用。这样您就可以维护您的 tensorflow-gpu 版本。

您可以从 cuDNN 档案中获取该库:https://developer.nvidia.com/rdp/cudnn-archive

确保您的整个配置符合经过测试的构建配置之一:https://www.tensorflow.org/install/source_windows#tested_build_configurations https://www.tensorflow.org/install/source#tested_build_configurations

答案3

请在终端中输入此内容......问题出在 Tensorflow 版本上

sudo pip install --upgrade --force-reinstall tensorflow-gpu==1.9.0

相关内容