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的安裝目錄中,如下圖所示:
在這里插入圖片描述


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM