当前位置:网站首页>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
边栏推荐
- An enterprise information integration system
- Basic number theory -- Euler function
- Halcon affine transformations to regions
- Run menu analysis
- [daiy4] jz32 print binary tree from top to bottom
- ORACLE进阶(三)数据字典详解
- Classification of plastic surgery: short in long long long
- ABC#237 C
- How can fresh students write resumes to attract HR and interviewers
- Go dependency injection -- Google open source library wire
猜你喜欢
随机推荐
猜谜语啦(7)
Classification of plastic surgery: short in long long long
OpenFeign
It cold knowledge (updating ing~)
Programming implementation of ROS learning 2 publisher node
Bluebridge cup internet of things basic graphic tutorial - GPIO input key control LD5 on and off
Some pitfalls of win10 network sharing
Count of C # LINQ source code analysis
EA introduction notes
golang 基础 —— golang 向 mysql 插入的时间数据和本地时间不一致
猜谜语啦(142)
Guess riddles (3)
Digital analog 1: linear programming
多元线性回归(梯度下降法)
Guess riddles (11)
kubeadm系列-00-overview
[牛客网刷题 Day4] JZ32 从上往下打印二叉树
猜谜语啦(4)
资源变现小程序添加折扣充值和折扣影票插件
[matlab] matlab reads and writes Excel