CuDNN版本不匹配

问题描述 投票:2回答:1

我非常接近使用keras / tensorflow python库配置支持gpu的环境。当我尝试训练我的模型时,我得到一个很长的错误信息:

2018-11-27 18:34:47.776387: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1511] Adding visible gpu devices: 0
2018-11-27 18:34:48.769258: I tensorflow/core/common_runtime/gpu/gpu_device.cc:982] Device interconnect StreamExecutor with strength 1 edge matrix:
2018-11-27 18:34:48.769471: I tensorflow/core/common_runtime/gpu/gpu_device.cc:988]      0 
2018-11-27 18:34:48.769595: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1001] 0:   N 
2018-11-27 18:34:48.769825: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 3024 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1050, pci bus id: 0000:01:00.0, compute capability: 6.1)
2018-11-27 18:34:50.405201: E tensorflow/stream_executor/cuda/cuda_dnn.cc:363] Loaded runtime CuDNN library: 7.1.4 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.

我看了几个类似的堆栈溢出帖子,看起来我需要调整CuDNN版本或tensorflow-gpu版本。我从Nvidia的网站上下载了正确版本的CuDNN,但它似乎没有做任何事情。我还发现了一些关于改变我的tensorflow-gpu版本的帖子,但我应该下载哪个版本以及如何。我正在使用WIndows 10。

python tensorflow gpu cudnn
1个回答
0
投票

嗨,这个powershell脚本应该可以更新你的驱动程序。

$ur='https://dsvmteststore.blob.core.windows.net/patches/cuda/cudnnpatch.zip?st=2019-02-20T04%3A10%3A00Z&se=2019-03-01T04%3A10%3A00Z&sp=r&sv=2017-07-29&sr=c&sig=w1VqK70ZcWWbbRW2K4Y8q5298dNxBqsoP71%2F4nF6uYM%3D'
Invoke-WebRequest -Uri  $ur  -OutFile '.\cudnnpatch.zip' -UseBasicParsing

$from='.\cudnnpatch.zip'
$to='.\'
cmd /c "c:\7-Zip\7z.exe x $from -o$to -y"


$root='C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0'


$dll='\bin\cudnn64_7.dll' 
$header='\include\cudnn.h' 
$lib='\lib\x64\cudnn.lib' 

$from='.\cuda'
Copy-Item "$from$dll" "$root$dll"  -Force
Copy-Item "$from$header" "$root$header"  -Force
Copy-Item "$from$lib" "$root$lib"  -Force
© www.soinside.com 2019 - 2024. All rights reserved.