当前位置:网站首页>【Tensorflow-gpu】window11下深度学习环境搭建
【Tensorflow-gpu】window11下深度学习环境搭建
2022-06-30 07:41:00 【雪天鱼】
我是 雪天鱼,一名FPGA爱好者,研究方向是FPGA架构探索和数字IC设计。
会在B站分享 IC相关教学课程,B站个人主页:https://space.bilibili.com/397002941?spm_id_from=333.1007.0.0
QQIC设计&FPGA&DL交流群
群号:866169462
。
操作系统: Window11专业版
显卡: NVIDIA RTX 3060 Laptop GPU
一、Anaconda安装
之前已经写过对应的安装教程:PyTorch深度学习入门笔记(一)PyTorch环境配置及安装https://blog.csdn.net/qq_44447544/article/details/122425322
二、CUDA安装
NVIDIA 控制面板 -> 左下角系统信息 ->组件 查看驱动所支持的 CUDA版本:
即支持 CUDA的最高版本为 11.6,但飞浆所支持的最高计算平台为 CUDA11.2,所以我就安装 11.2.2版本的了。
CUDA官方下载链接:https://developer.nvidia.com/cuda-toolkit-archive
选择操作系统相关信息,点击【Download】 开始下载,下载好后双击安装即可。
选择自定义安装,可自己选择组件,若已经安装过 VS,则可以取消该组件的安装,这里我都没有安装,所以直接下一步。
然后选中安装位置,这里我C盘是 1TB固态,所以我就直接按默认位置安装了。
然后是提示安装 Visual Studio,否则有些功能无法正常使用。
三、cudnn安装
cuda可以看做是一个工作台,而cudnn是基于cuda的深度学习加速库,想要在cuda上进行深度学习加速必须安装cudnn。
官网下载链接: https://developer.nvidia.com/zh-cn/cudnn
注册账号登录。
找个支持 CUDA11.2.2的 cuDNN,这里我下载 cuDNN v8.1.1版本
661MB,耐心等待即可。
下载好后解压即可,文件夹中有3个文件夹和一个文件:
复制粘贴到安装的CUDA文件夹里,默认位置是C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2,遇到提示,为全部选择覆盖和替换。
输入 nvcc -V
,验证是否安装成功,出现下图所示信息即为安装成功。
四、tensoflow-gpu 安装
首先要选择好要安装的版本,打开 https://tensorflow.google.cn/install/source_windows
拉到最下面,可以看到gpu版本兼容信息:
可以看到,CUDA版本为11.2,cuDNN版本为8.1时,支持的tensorflow_gpu 版本为 2.6.0和2.5.0,这里我们下载v2.6.0,然后 python版本用3.8。
安装的具体操作为,打开CMD 终端,输入下述指令:
(1)创建虚拟环境
conda create -n tf2.6 python=3.8
这里 tf2.6
为所指定的环境名, python=3.8
则指定python版本为 3.8。
输入 y,然后 回车,conda开始自动下载必要的包。下载完成后如下图所示:
(2)激活 tf2.6 虚拟环境
activate tf2.6
(3)下载 tensorflow-gpu 包
pip install tensorflow-gpu==2.6.0
一共 423.3MB,不是很大
(4)验证安装是否成功。
python
import tensorflow as tf
tf.config.list_physical_devices('GPU')
这里我运行后报错了,如下所示:Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found
,即缺少 cudart64_110.dll
文件,去下载即可。官方下载链接:https://www.dll-files.com/cudart64_110.dll.html
选择第一个Download即可,下载的压缩包解压得到 cudart64_110.dll
,把cudart64_110.dll复制粘贴到C:/Windows/System32
里就可以了:
重新输入出现如下图所示输出,表示成功安装了TensorFlow GPU版本。
开始愉快开始深度学习!!!
边栏推荐
- Examen final - notes d'apprentissage PHP 6 - traitement des chaînes
- Arm debug interface (adiv5) analysis (I) introduction and implementation [continuous update]
- 期末复习-PHP学习笔记4-PHP自定义函数
- Recurrence relation (difference equation) -- Hanoi problem
- 期末复习-PHP学习笔记6-字符串处理
- Ad\dxp how to solve the problem of not knowing the schematic Library
- Distance from point to line
- How to batch modify packaging for DXP schematic diagram
- Xiashuo think tank: 125 planet updates reported today (packed with 101 meta universe collections)
- Final review -php learning notes 5-php array
猜你喜欢
Basic knowledge points
【花雕体验】13 搭建ESP32C3之PlatformIO IDE开发环境
2021-10-29 [microbiology] a complete set of 16s/its analysis process based on qiime2 tool (Part I)
期末复习-PHP学习笔记3-PHP流程控制语句
深度学习——循环神经网络
Final review -php learning notes 3-php process control statement
Armv8 (coretex-a53) debugging based on openocd and ft2232h
2022.01.20 [bug note] | qiime2: an error was encoded while running dada2 in R (return code 1)
Graphic explanation pads update PCB design basic operation
Digital white paper on total cost management in chain operation industry
随机推荐
Account command and account authority
Intersection of two lines
Wangbohua: development situation and challenges of photovoltaic industry
Final review -php learning notes 6- string processing
深度学习——使用词嵌入and词嵌入特征
Final review -php learning notes 1
2021 private equity fund market report (62 pages)
Disk space, logical volume
Investment and financing analysis report of Supply Chain & logistics industry in 2021
Arm debug interface (adiv5) analysis (I) introduction and implementation [continuous update]
Recurrence relation (difference equation) -- Hanoi problem
Cross compile opencv3.4 download cross compile tool chain and compile (3)
深度学习——网络中的网络以及1x1卷积
Installation software operation manual (continuous update)
Final review -php learning notes 11-php-pdo database abstraction layer
深度学习——目标定位
STM32 infrared communication 2
鲸探NFT数字臧品系统开发技术分享
Summary and common applications of direction and angle operators in Halcon
深度学习——残差网络ResNets