TensorFlow 解决“ImportError: Could not find 'cudnn64_6.dll'”

解决“ImportError: Could not find 'cudnn64_6.dll'”

1. 问题描述


运行一个基于Tensorflow的代码时报错,如下所示:

ImportError: Could not find 'cudnn64_6.dll'. TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable. Note that installing cuDNN is a separate step from installing CUDA, and this DLL is often found in a different directory from the CUDA DLLs. You may install the necessary DLL by downloading cuDNN 6 from this URL: https://developer.nvidia.com/cudnn
  • 1

2. 解决方法


S1. 根据自己CUDA的版本和操作系统,下载cuDNN v6.0文件,地址:https://developer.nvidia.com/rdp/cudnn-archive


S2. 解压cuDNN,把里面的binincludelib这三个文件夹拷贝到CUDA的安装目录中,如下图所示:
在这里插入图片描述

posted @ 2019-12-13 17:05  地球守卫者  阅读(...)  评论(...编辑  收藏