当前位置:网站首页>【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版本。
开始愉快开始深度学习!!!
边栏推荐
- 鲸探NFT数字臧品系统开发技术分享
- 【花雕体验】12 搭建ESP32C3之Arduino开发环境
- 期末复习-PHP学习笔记6-字符串处理
- Examen final - notes d'apprentissage PHP 6 - traitement des chaînes
- 期末复习-PHP学习笔记2-PHP语言基础
- Cadence physical library lef file syntax learning [continuous update]
- Examen final - notes d'apprentissage PHP 5 - Tableau PHP
- 1163 Dijkstra Sequence
- Simple application of generating function -- integer splitting 2
- 2022 Research Report on China's intelligent fiscal and tax Market: accurate positioning, integration and diversity
猜你喜欢
![2021-10-27 [WGS] pacbio third generation methylation modification process](/img/a3/39d05e0daf4ea7eba95337b7a936b1.jpg)
2021-10-27 [WGS] pacbio third generation methylation modification process

期末复习-PHP学习笔记4-PHP自定义函数

Deep learning -- feature point detection and target detection

回文子串、回文子序列

Ad\dxp how to solve the problem of not knowing the schematic Library

期末複習-PHP學習筆記6-字符串處理
![2021.11.20 [reading notes] | differential variable splicing events and DTU analysis](/img/02/6971454e51c015990b5b60b357ee1d.jpg)
2021.11.20 [reading notes] | differential variable splicing events and DTU analysis

right four steps of SEIF SLAM

Installation software operation manual (continuous update)

深度学习——特征点检测和目标检测
随机推荐
期末复习-PHP学习笔记5-PHP数组
期末复习-PHP学习笔记8-mysql数据库
Efga design open source framework fabulous series (I) establishment of development environment
Line fitting (least square method)
Basic knowledge points
深度学习——使用词嵌入and词嵌入特征
Desk lamp control panel - brightness adjustment timer
Final review -php learning notes 3-php process control statement
【笔记】Polygon mesh processing 学习笔记(10)
深度学习——词汇表征
期末複習-PHP學習筆記5-PHP數組
HelloWorld
STM32 key control LED
架构实战营模块 5 作业
Inversion Lemma
C. Fishingprince Plays With Array
2022 retail industry strategy: three strategies for consumer goods gold digging (in depth)
Installation software operation manual (continuous update)
Basic operation command
Introduction notes to pytorch deep learning (10) neural network convolution layer