我已经按照在 Windows 上安装 TensorFlow安装了 tensorflow-gpu ,当我导入 tensorflow 时它似乎运行良好,但是今天当我尝试一个新程序时,它显示了一些错误:
`
2017-07-12 09:33:31.301985: E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\cuda\cuda_dnn.cc:352] Loaded runtime CuDNN library: 6021 (compatibility version 6000) but source was compiled with 5105 (compatibility version 5100). If using a binary install, upgrade your CuDNN library to match. If building from sources, make sure the library loaded at runtime matches a compatible version specified during compile configuration.
2017-07-12 09:33:31.302851: F c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\kernels\conv_ops.cc:659] Check failed: stream->parent()->GetConvolveAlgorithms(&algorithms)
`
我知道这意味着我应该将我的 cudnn5.1 升级到 cudnn6,然后我下载 cudnn6 并将文件复制到我的 cuda 安装目录。然后在cudn/v8.0/bin目录下存在两个cudnn dll:cudnn64_5.dll和cudnn64_6.dll。
当我重新运行我的程序时,仍然出现同样的错误,当我删除 cudnn64_5.dll 时,我什至无法运行我的程序,出现一些新的错误:
`
builtins.ImportError: Traceback (most recent call last):
File "c:\Users\chenc\Anaconda3\envs\tensorflow-gpu\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper
return importlib.import_module(mname)
File "c:\Users\chenc\Anaconda3\envs\tensorflow-gpu\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 666, in _load_unlocked
File "<frozen importlib._bootstrap>", line 577, in module_from_spec
`
我将我的cudnn64_6.dll重命名为cudnn64_5..dll,上面的错误消失了但仍然显示我的cudnn版本是5105。看来我必须做其他事情才能使cudnn升级工作,但我不知道。什么我应该怎么做才能解决错误?