【问题标题】:CuDNN version does not matchCuDNN 版本不匹配
【发布时间】:2018-11-28 01:14:52
【问题描述】:

我非常接近使用 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


    【解决方案1】:

    您好,这个 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
    

    【讨论】:

      猜你喜欢
      • 2019-06-27
      • 2016-12-09
      • 2012-04-22
      • 2023-03-19
      • 2019-01-12
      • 2020-11-15
      • 2011-10-07
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多