当前位置:网站首页>Install the CPU version of tensorflow+cuda+cudnn (ultra detailed)
Install the CPU version of tensorflow+cuda+cudnn (ultra detailed)
2022-07-05 08:46:00 【m0_ forty-six million ninety-three thousand eight hundred and t】
Purpose : install GPU Version of tensorflow
One 、 Check out the NVIDIA Does the version support CUDA And configurable CUDA edition
Method :
Right click in a blank space on the desktop , Open NVIDIA control panel , If you can't find it, you can refer to the following website win10 nvidia How to open the control panel ,win10 nvidia Control panel opening steps - Chinese cabbage u Disk start (dabaicai.com)
After opening , Click on the bottom left corner “ system information ”, Click again “ Components ”, notice NVCUDA.DLL Version shown later
You can see that my computer supports CUDA Of , And the highest version supports 11.4.94( Downward compatible ), At this time, I actually download <=11.4.94 Of CUDA All versions are available , Because downward compatibility . But you can also match it with the official website :
First check my graphics card version :
Go again CUDA Check the version correspondence on the official website : Release Notes :: CUDA Toolkit Documentation
Then you can see that my graphics card version is 471.41, So I can download CUDA11.4 update4 Following CUDA.( Backwards compatible ) If I want to download the above version , Then I can try to update my graphics card driver ( If it is already the latest , There's nothing we can do about it ) Update driver : Official Drivers | NVIDIA
Additional description : I'm really Xiaobai , At that time, I didn't know how to find this version comparison when searching by myself , Even if you enter the official website, you can't find , Although many people have given links , But I still want to find it by myself , So the search process is attached below
1. Enter CUDA Official website , Then select the document ( Because I'm looking for version comparison , So I'll check the document and try )
2. Get into NVIDIA CUDA Tooklkit(CUDA tool kit )
3,
thus , Finally found
Two 、 Confirm your installation tensorflow type
For example, I want to install tensorflow_gpu_1.15.0
Then tensorflow Official website stay Windows Build from source code in the environment | TensorFlow
Check the supported CUDA and CUDNN Version of
3、 ... and 、 install CUDA
Please see what you need TENSORFLOW model , And the environment it needs !
Because I want to install tensorflow_gpu_1.15.0, It supports CUDA The version is 7.4,CUDNN The version is 10, So I need to CUDA Download on 7.4 Version of , The method is as follows :
Enter... In search engine CUDA+ Version number
When the download is complete , Open setup , Choose where you want to install , Can be installed
Then agree and continue
Note here that if the current version is higher than the new version , Then uncheck , Otherwise installation will fail
Configure environment variables
Right click on my computer stand alone --> attribute
Check whether there are two environment variables in the figure below , There is no need to match , Because I have , So I don't know how to solve it , Therefore, if there is no partner, you need to search separately
thus CUDA10.0 It is installed , Verify that the installation was successful :
First step : Press... On the keyboard at the same time “windows key +R”, Input “cmd” And return , Get into windows Command line interface .
The second step : Input from the command line “nvcc -V” And return
The third step : If installed successfully CUDA Words , Will be displayed CUDA Version number of .
Four 、 install CUDNN
CUDNN download :cuDNN Archive | NVIDIA Developer
Because I want to download tensorflow adapter 7.4 Version of CUDNN, So I download 7.4.1 Version of CUDNN
When the download is complete , Unzip downloaded cuDNN Compressed package , Copy the files to CUDA In the folder
At this time, if you want to check your CUDNN Is the installation successful , Then you can get to The following table of contents , Find out if there is cudnn.h file , If there is , It means your cudnn Installation is successful
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\include
If you want to continue to check the version you installed , Open the above cudnn.h file , Find the following code , On behalf of you cudnn The version is 7.4.1
5、 ... and 、 install anaconda
I have installed on my computer before anaconda, Therefore, the installation process will not be put here , Partners in need need also need to use their small hands to search .
6、 ... and 、 use ANACONDA install TENSORFLOW
1) stay ANACONDA Create a file named TENSORFLOW Environment ( You can call him any name , Here I call this environment TENSORFLOW.
conda create -n tensorflow pip python=3.6
here pip python=3.6 In the name of tensorflow The build version in the environment of is 3.6 Of python.
2) Activate the environment
conda activate tensorflow
( To deactivate the environment and delete the environment, use the following two lines of code )
conda deactivate
conda env remove -n tensorflow
3) install tensorflow-gpu 1.15 edition
pip install --user tensorflow-gpu==1.15 -i https://pypi.tuna.tsinghua.edu.cn/simple
The display shows that the interface instructions are installed
4) The detection is successful
Enter python, Then enter the following code to test
import tensorflow as tf
print('GPU', tf.test.is_gpu_available())
If the following interface is displayed, the installation is successful
Now it's done !
Thank you, blogger :
Win10 install CUDA+cuDNN+TensorFlow-GPU Firefly
Anaconda Lower installation tensorflow1.15 Process record - You know
边栏推荐
- Guess riddles (142)
- 微信H5公众号获取openid爬坑记
- 【日常训练--腾讯精选50】557. 反转字符串中的单词 III
- Daily question - input a date and output the day of the year
- Meta标签详解
- Run menu analysis
- Business modeling of software model | object modeling
- Numpy 小坑:维度 (n, 1) 和 维度 (n, ) 数组相加运算后维度变为 (n, n)
- Basic number theory -- Euler function
- C# LINQ源码分析之Count
猜你喜欢
容易混淆的基本概念 成员变量 局部变量 全局变量
【NOI模拟赛】汁树(树形DP)
Meizu Bluetooth remote control temperature and humidity access homeassistant
猜谜语啦(11)
Illustration of eight classic pointer written test questions
猜谜语啦(10)
STM32 lights up the 1.8-inch screen under Arduino IDE
How to manage the performance of R & D team?
Apaas platform of TOP10 abroad
Digital analog 1: linear programming
随机推荐
Cmder of win artifact
Warning: retrying occurs during PIP installation
Example 006: Fibonacci series
猜谜语啦(5)
Guess riddles (10)
[daily training -- Tencent selected 50] 557 Reverse word III in string
Count of C # LINQ source code analysis
[formation quotidienne - Tencent Selection 50] 557. Inverser le mot III dans la chaîne
资源变现小程序添加折扣充值和折扣影票插件
Shift operation of complement
Some pitfalls of win10 network sharing
Numpy 小坑:维度 (n, 1) 和 维度 (n, ) 数组相加运算后维度变为 (n, n)
[noi simulation] juice tree (tree DP)
2022.7.4-----leetcode. one thousand and two hundred
GEO数据库中搜索数据
Bluebridge cup internet of things competition basic graphic tutorial - clock selection
[daily training] 1200 Minimum absolute difference
Illustration of eight classic pointer written test questions
容易混淆的基本概念 成员变量 局部变量 全局变量
猜谜语啦(7)