当前位置:网站首页>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
边栏推荐
- Example 010: time to show
- Halcon affine transformations to regions
- Esp8266 interrupt configuration
- Basic number theory - factors
- js异步错误处理
- IT冷知识(更新ing~)
- Tips 1: Web video playback code
- Dynamic dimensions required for input: input, but no shapes were provided. Automatically overriding
- Redis implements a high-performance full-text search engine -- redisearch
- Adaboost使用
猜你喜欢
Arduino burning program and Arduino burning bootloader
Arduino operation stm32
Lori remote control commissioning record
Arduino+a4988 control stepper motor
微信H5公众号获取openid爬坑记
猜谜语啦(3)
It cold knowledge (updating ing~)
Meizu Bluetooth remote control temperature and humidity access homeassistant
Halcon Chinese character recognition
319. 灯泡开关
随机推荐
319. Bulb switch
Guess riddles (3)
Solutions of ordinary differential equations (2) examples
319. 灯泡开关
Lori remote control LEGO motor
【日常訓練--騰訊精選50】557. 反轉字符串中的單詞 III
Arrangement of some library files
Esphone retrofits old fans
Example 006: Fibonacci series
特征工程
Shift operation of complement
LLVM之父Chris Lattner:为什么我们要重建AI基础设施软件
Dynamic dimensions required for input: input, but no shapes were provided. Automatically overriding
某公司文件服务器迁移方案
容易混淆的基本概念 成员变量 局部变量 全局变量
696. Count binary substring
Guess riddles (8)
Arduino operation stm32
Example 010: time to show
Bluebridge cup internet of things basic graphic tutorial - GPIO input key control LD5 on and off