To learn tensorflow, you need to use Nvidia's cuda package, and then I haven't finished it for two hours. It is all a problem. When encountering difficulties, I sleep decisively and sleep for five hours! ! !
Let me talk about the problems I encountered:
- My NVIDIA CUDA version is 9.1 and I want to use 10.1, mine is too old, I need to upgrade
windows10 to install cuda10.2
win10 to install cuda10.1+cudnn760 - After downloading CUDA10.1, I couldn't find the NVINIA GPU Computing Toolkit folder, so I installed it three times, only to find the problem
Windows10 -64 installation tensorflow encountered: the installation file directory cannot be found after cuda installation
Preface
After tensorflow1.12, gpu uses the driver corresponding to cuda10.0, it is not required to install cuda, [but pytorch requires the installation of cuda and cudnn (not sure)], if the driver version of this machine is less than the driver version corresponding to cuda10.0, it is recommended to install cuda10.x driver to overwrite the driver of this machine, no need to uninstall and install the driver
One, install CUDA
Download links for each version of NVIDIA CUDA (updated to 2019-12-11, including the latest 10.2 version)
1. Check the cuda version supported by your computer: open the NVIDIA control panel, click the system information in the help, click the component, and see NVCUDA.DLL. There is the cuda version number supported by your computer on the right side of the line. Mine is 9.1. The
driver needs to be upgraded to 10.1. The driver is cuda9.0. You need to overwrite this driver when installing cuda 10.2
Installation process
There is this step at the beginning, so you must not change it! ! ! Use temporary decompression path
If you choose custom installation, you can choose to install the driver, overwrite the driver of the machine
and read the tutorial.
Don’t choose Visual Studio Integration. Even if you choose it, you can’t successfully install it
under the CUDA node. Cancel the "Visual Studio Integration" item; Under the "Driver components" node, compare the version number "Current Version" of the graphics card driver "Display Driver" currently installed on the computer with the version number of the graphics card driver "New Version" that comes with CUDA, if "Current Version" is greater than "New Version" , You need to uncheck "Display Driver", if it is less than or equal to, then check it by default
Remember the installation location, tensorflow requires the configuration environment to be configured
after the installation is complete. Path needs to manually add the following path, corresponding to the installation path
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\lib\x64
C: \Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\include
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\extras\CUPTI\lib64
C:\ProgramData\NVIDIA Corporation\CUDA Samples\v10 .2\bin\win64
C:\ProgramData\NVIDIA Corporation\CUDA Samples\v10.2\common\lib\x64
Two, install cudnn
First look at the corresponding version number of cudnn.
I found a Baidu cloud cudnn myself . This is a 64-bit version. Please work hard for a 32-bit version .
After downloading, unzip, rename the file (cuda) to cudnn760, and put it in C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\ This directory, you will need administrator rights, and then add it to the system environment variables C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\cudnn760\bin
verification
Finally, open the command window cmd, enter the verification command nvcc -V and
output the above information to indicate that the installation is successful!
It's finally good. Everyone encountered other problems during installation. You can
send me a private message or comment below ღ (´・ᴗ・`)