当前位置:网站首页>使用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
完毕!
如果大家觉得本文章对你有帮助,麻烦点赞+收藏一下,谢谢!
边栏推荐
- STM32——PWM学习笔记
- Self-supervised learning method to solve the inverse problem of Fokker-Planck Equation
- Canvas - ECG design and how to clean the canvas
- [sql] case expression
- Swin Transformer【Backbone】
- OxyCon 2022 网络抓取前沿大会即将开启!
- What is the difference between heap memory and stack memory?
- JVM内存模型解析
- [NOIP2001 普及组]装箱问题
- (9) Attribute introspection
猜你喜欢

Leetcode · 83 biweekly match · 6128. best poker hand · simulation

YOLOv3: An Incremental Improvement

How to install with USB flash disk?

Arthas download and startup

Unknown-Aware Object Detection:Learning What You Don’t Know from Videos in the Wild(CVPR 2022)

如何正确计算 Kubernetes 容器 CPU 使用率

图解LeetCode——5. 最长回文子串(难度:中等)

Software testing post: Ali has three sides. Fortunately, he has made full preparations and has been offered

c语言分层理解(c语言函数)

YOLOv3: An Incremental Improvement
随机推荐
Win11隐藏输入法状态栏方法
Swin Transformer【Backbone】
一切的源头,代码分支策略的选择
Type the URL to the web page display. What happened during this period?
How about GF Securities? Is it safe to open an account online?
Standardize your own debug process
Arthas view the source code of the loaded class (JAD)
(九)属性自省
canvas——心电图的设计,以及如何清理画布
What's good for starting a business with 10000 yuan? Is we media OK?
班级里有一群学生考试结果出来了,考了语文和数学两门,请筛选出总分是第一的同学
[NOIP2001 普及组]装箱问题
Unity quickly builds urban scenes
Canvas -- drawing of rectangle -- making of histogram
[detailed explanation of key and difficult points of document operation]
Continuous delivery and Devops are good friends
规范自己debug的流程
【TensorFlow&PyTorch】图像数据增强API
There are a group of students in the class who have got the test results in Chinese and mathematics. Please select the students whose total score is the first
[translation] cloud like internal load balancer for kubernetes?
