当前位置:网站首页>Detailed steps for tensorflow-gpu2.4.1 installation and configuration
Detailed steps for tensorflow-gpu2.4.1 installation and configuration
2022-08-03 19:40:00 【AI Algorithm Alliance】
I. Machine environment
Graphics card: RTX3060
System: windows10
Second, tensorflow-gpu configuration environment
CUDA:11.1.1
cuDNN:8.1.1
Language: Python3.8.8
Deep learning framework: Tensorflow-gpu2.4.1, Keras2.4.3
III. Installation process
1. Install Visual studio 2017.Compile dependencies.Check Desktop development using C++ when selecting the workload.Download address: https://visualstudio.microsoft.com/zh-hans/thank-you-downloading-visual-studio/?sku=Community&rel=15
2. Install CUDA.The CUDA11.1.1 version is installed here.File name: cuda_11.1.1_456.81_win10.exe.There are about 3.1G.After downloading, double-click to install it. It is installed to the C drive by default and takes up little space.Download address: https://developer.nvidia.com/cuda-toolkit-archive
3. Download cudnn.An account login is required, if you don't have one, register one.The download here is cuDNN8.1.1.File name: cudnn-11.2-windows-x64-v8.1.1.33.zip.There are about 661M.After decompression, there are three folders bin, include, lib.Copy the files in the three folders to the corresponding folder in the CUDA installation directory.My CUDA installation directory is: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1.Take the bin folder as an example, copy all the files in the bin to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1\bin.Download address: https://developer.nvidia.com/zh-cn/cudnn
The above three are installed and restart the computer.
4. Install python.Installed here is python3.8.8.File name: python-3.8.8-amd64.exe.About 27M.Download address: https://www.python.org/getit/
5. Install tensorflow-gpu.Install using pip.Command line: pip install tensorflow-gpu==2.4.1 -i https://pypi.tuna.tsinghua.edu.cn/simple/ It is faster to install using Tsinghua image.
6. Install keras.Install using pip.Command line: pip install keras==2.4.3 -i https://pypi.tuna.tsinghua.edu.cn/simple/ It is faster to install using Tsinghua mirror.
Fourth, test.
import tensorflow as tfprint(tf.__version__)print(tf.test.is_built_with_cuda())print(tf.test.is_gpu_available())
First, bug handling.
When testing print(tf.test.is_gpu_available()) print is False, prompt: Not creating XLA devices, tf_xla_enable_xla_devices not set
Workaround: Find cusolver64_11.dll in the bin folder of the CUDA installation directory and rename it to cusolver64_10.dll.After renaming, test again and find that print(tf.test.is_gpu_available()) prints True, but there is still a Not creating XLA devices, tf_xla_enable_xla_devices not set prompt.This does not affect usage.
Second, test print information description:
Created TensorFlow device (/device:GPU:0 with 10491 MB memory) -> physical GPU (device: 0, name: NVIDIA GeForce RTX 3060, pci bus id: 0000:01:00.0, compute capability: 8.6)
True
Graphics card information: NVIDIA GeForce RTX 3060, graphics card computing power: 8.6, GPU availability: True
tips:
a. Enter nvcc -V in the terminal to view the cuda version.
b. Enter nvidia-smi in the terminal to check the graphics card driver version, the highest supported cuda version, and the graphics card usage.
c.python IDE tool, I personally recommend PyCharm.
d. The installation process of other graphics cards is similar, but pay attention to the cuda version supported by the graphics card and the versions of cuda, cudnn, python, tensorflow, and keras.
边栏推荐
- 网络协议-TCP、UDP区别及TCP三次握手、四次挥手
- LOL英雄联盟卡顿掉帧问题解决办法 2022年8月1日
- Postgresql snapshot optimization Globalvis new system analysis (performance greatly enhanced)
- 边缘盒子+时序数据库,美的数字化平台 iBuilding 背后的技术选型
- 开发即时通讯到底需要什么样的技术,需要多久的时间
- 安装radondb mysql遇到问题
- 盘点在线帮助中心对企业能够起到的作用
- 单调栈及其应用
- 622 设计循环队列——Leetcode天天刷【循环队列,数组模拟,双指针】(2022.8.2)
- 友宏医疗与Actxa签署Pre-M Diabetes TM 战略合作协议
猜你喜欢
那些年我写过的语言
高效目标检测:动态候选较大程度提升检测精度(附论文下载)
【夜莺监控方案】08-监控msyql集群(prometheuse+n9e+mysqld_exporter)
Cobalt Strike (CS) 逆向初探
NNLM、RNNLM等语言模型 实现 下一单词预测(next-word prediction)
JMeter笔记5 |Badboy使用和录制
演讲议题及嘉宾重磅揭晓,TDengine 开发者大会推动数据技术“破局”
边缘盒子+时序数据库,美的数字化平台 iBuilding 背后的技术选型
Radondb mysql installation problems
阿里巴巴政委体系-第七章、阿里政委培育
随机推荐
relocation R_X86_64_PC32 against,/usr/bin/ld: final link failed: Bad value
力扣刷题之求两数之和
基础软件与开发语言开源论坛| ChinaOSC
图像超分——Real-ESRGAN快速上手
Internet Download Manager简介及下载安装包,IDM序列号注册问题解决方法
APT级全面免杀与企业纵深防御体系的红蓝对抗
Force is brushed buckle problem for the sum of two Numbers
危化企业双重预防机制数字化建设进入全面实施阶段
net-snmp编译报错:/usr/bin/ld: cannot find crti.o: No such file or directory
Postgresql中的pg_memory_barrier_impl和C的volatile
安装anaconda并创建虚拟环境
友宏医疗与Actxa签署Pre-M Diabetes TM 战略合作协议
JMeter笔记5 |Badboy使用和录制
演讲议题及嘉宾重磅揭晓,TDengine 开发者大会推动数据技术“破局”
The addition and subtraction of the score of the force deduction brush question (a daily question 7/27)
边缘盒子+时序数据库,美的数字化平台 iBuilding 背后的技术选型
Brush the topic of mobile zero power button
Execute the mysql script file in the docker mysql container and solve the garbled characters
ECCV2022 | 用于视频问题回答的视频图Transformer
The ecological environmental protection management system based on mobile GIS