当前位置:网站首页>使用anaconda配置gpu版本的tensorflow(30系列以下显卡)
使用anaconda配置gpu版本的tensorflow(30系列以下显卡)
2022-07-26 03:10:00 【舞雩.】
使用anaconda配置gpu版本的tensorflow(30系列以下显卡)
环境内容
tensorflow-gpu:2.2.0
无需安装keras,tensorflow与keras合并了,简而言之,tensorflow自带keras
接下来要用到的所有安装文件——网盘下载(不用自己去下载啦):
链接:https://pan.baidu.com/s/1cSwNCRKY0syOt-NBEdr94Q
提取码:p002
一、Anaconda环境配置
1、Anaconda的下载(可以跳过)
————————————————
新版本anaconda的下载:
安装最新的Anaconda,首先登录Anaconda的官网:Anaconda | Individual Edition。直接下载对应安装包就可以。
2、Anaconda的安装
打开下载好的安装包。

选择安装的位置,可以不安装在C盘。 我选择了Add Anaconda to my PATH environment variable,这样会自动将anaconda装到系统的环境变量中,配置会更加方便一些。

等待安装完之后,Anaconda的安装就结束了。
二、Cudnn和CUDA的下载和安装
我这里使用的是tensorflow-gpu=2.2.0,官方推荐的Cuda版本是10.1,因此会用到cuda10.1,与cuda10.0对应的cudnn是7.6.5。(当然高一点的版本也是没有问题的,但尽量不要低于)
1、Cudnn和CUDA的下载(已给)
具体下载过程包括注册等繁琐的步骤,既然已经给了安装包,为了保持精简就不在此赘述。
2、Cudnn和CUDA的安装
下载好之后可以打开exe文件进行安装。

这里选择自定义。

然后直接点下一步就行了。

安装完后在C盘这个位置可以找到根目录。C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0然后大家把Cudnn的内容进行解压。
把这里面的内容直接复制到C盘的根目录下就可以了。
三、配置Tensorflow环境
1、Tensorflow环境的创建与激活
打开anaconda prompt:
conda create -n tf-gpu python=3.7 -yactivate tf2-gpu这里一共存在两条指令:
前面一条指令用于创建一个名为tf2-gpu的环境,该环境的python版本为3.7。
后面一条指令用于激活一个名为tf2-gpu的环境。
由于我们所有的操作都要在对应环境中进行,所以在进行库的安装前需要先激活环境。
2、相关库的安装
需要安装的库总览:
scipy==1.4.1
numpy==1.18.4
matplotlib==3.2.1
opencv_python==4.2.0.34
tensorflow_gpu==2.2.0
tqdm==4.46.1
Pillow==8.2.0
h5py==2.10.0
如果想要更便捷的安装可以在桌面或者其它地方创建一个requirements.txt文件,复制上述内容到txt文件中。

输入命令:
小技巧:只需要把文件移动文件到anaconda/cmd窗口中可以自动获取该文件的绝对路径。
pip install -r C:\Users\33232\Desktop\requirements.txt -i https://pypi.mirrors.ustc.edu.cn/simple/
四、使用tf2-gpu环境 (可看我以往教程最后一步)
(5条消息) 没有显卡怎么使用anaconda配置tensorflow深度学习环境_舞雩.的博客-CSDN博客_tensorflow-cpu
完毕!
如果大家觉得本文章对你有帮助,麻烦点赞+收藏一下,谢谢!
边栏推荐
- 一切的源头,代码分支策略的选择
- [tensorflow & pytorch] image data enhancement API
- Arthas' dynamic load class (retransform)
- Unity quickly builds urban scenes
- 一篇文章让你理解 云原生 容器化相关
- OxyCon 2022 网络抓取前沿大会即将开启!
- [NOIP2001 普及组] 最大公约数和最小公倍数问题
- Chen Yili, China Academy of communications technology: cost reduction and efficiency increase are the greatest value of Enterprise Cloud native applications
- Installation and operation of orb-slam2 under ROS
- Skill list of image processing experts
猜你喜欢

Pit trodden when copying list: shallow copy and deep copy

Win11更改磁盘驱动器号的方法

How to reinstall win7 system?

LeetCode·每日一题·剑指 Offer || 115.重建序列·拓扑排序

MySQL tutorial: MySQL database learning classic (from getting started to mastering)

多线程编程

LeetCode·

Safety margin of mass consumption

JVM内存模型解析

Remember SQL optimization once
随机推荐
Remember SQL optimization once
Pit trodden when copying list: shallow copy and deep copy
Arthas' dynamic load class (retransform)
Get twice the result with half the effort: learn the web performance test case design model
Have you ever seen this kind of dynamic programming -- the stock problem of state machine dynamic programming (Part 1)
Machine learning foundation plan 0-2: what is machine learning? What does it have to do with AI?
班级里有一群学生考试结果出来了,考了语文和数学两门,请筛选出总分是第一的同学
Anti electronic ink screen st7302
【尤里复裂人】带你轻松理解——深拷贝和浅拷贝
【C语言】深入理解 整型提升 和 算术转换
canvas——矩形的绘制——柱状图的制作
Be highly vigilant! Weaponization of smartphone location data on the battlefield
当点击Play以后,EditorWindow中的变量会被莫名其妙销毁.
"Xiao Deng's view" the value brought by Siem to enterprises (II)
复制列表时踩过的坑:浅拷贝与深拷贝
Type the URL to the web page display. What happened during this period?
FPGA_Vivado软件初次使用流程_超详细
Multithreaded programming
如何正确计算 Kubernetes 容器 CPU 使用率
(9) Attribute introspection
