Cannot import Tensorflow for GPU on Windows 10

后端 未结 9 1742
被撕碎了的回忆
被撕碎了的回忆 2020-11-27 08:16

Trying to install the gpu version of Tensorflow on my machine, but I\'m getting this error when trying \'import tensorflow\'


ImportError

相关标签:
9条回答
  • 2020-11-27 08:30

    It didn't work for me trying to change dll file versions. After struggling with tensorflow-gpu import error for a couple of weeks, I finally figured out that I needed to make respective directories(CUDA,cuDNN & CUPTI) matched to my %PATH% environment variable. I am using CUDA 9.0, cuDNN v7.0 with Tensorflow 1.11.

    C:\> SET PATH=C:\Program Files\NVIDIA GPU Computing
    Toolkit\CUDA\v9.0\bin;%PATH% 
    
    C:\> SET PATH=C:\Program Files\NVIDIA GPU
    Computing Toolkit\CUDA\v9.0\extras\CUPTI\libx64;%PATH% 
    
    C:\> SET PATH=C:\tools\cuda\bin;%PATH%
    

    https://www.tensorflow.org/install/gpu

    0 讨论(0)
  • 2020-11-27 08:36

    You need to have CUDA_HOME leading to \cuda and %CUDA_HOME%\bin appended to your PATH. Also, tensorflow as of now only supports cudNN 5.1, please make sure you have that.

    0 讨论(0)
  • 2020-11-27 08:39

    It should be noted that starting from version 1.0 up until version 1.2 Tensorflow needed Cuda8 and cudnnv5.1. Therefore You need to have cudnnv5.1 installed.
    This question was asked on April 24 2017, This means the OP was trying to install version 1.1.0(at the time, the latest version) which at the time needed cudnnv5.1 and python3.5. So he needed to have cudnnv5.1 to fix his/her problem.

    However, if you are trying to install the latest version of Tensorflow, that is anything greater than 1.3.0, you need cudnnv6.0 +.
    If you are getting this error on 1.3.0, then it means you need cudnnv6.0. put that into your PATH and you will be fine.

    0 讨论(0)
提交回复
热议问题