当前位置:网站首页>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.
边栏推荐
猜你喜欢
随机推荐
Shell programming loop statement
开源生态研究与实践| ChinaOSC
dpkg强制安装软件
软件测试回归案例,什么是回归测试?
Power button brush the topic of merging two orderly array
redis常用命令,HSET,XADD,XREAD,DEL等
glide set gif start stop
ADS 2023 下载链接
七夕之前,终于整出了带AI的美丽秘笈
边缘盒子+时序数据库,美的数字化平台 iBuilding 背后的技术选型
ERROR: You don‘t have the SNMP perl module installed.
Radondb mysql installation problems
flex布局
LOL英雄联盟卡顿掉帧问题解决办法 2022年8月1日
NNLM、RNNLM等语言模型 实现 下一单词预测(next-word prediction)
【夜莺监控方案】08-监控msyql集群(prometheuse+n9e+mysqld_exporter)
Cobalt Strike (CS) 逆向初探
Postgresql中的pg_memory_barrier_impl和C的volatile
Force is brushed buckle problem for the sum of two Numbers
基于移动GIS的环保生态管理系统