当前位置:网站首页>There is no need to install CUDA and cudnn manually. You can install tensorflow GPU through a one-line program. Take tensorflow gpu2.0.0, cuda10.0, cudnn7.6.5 as examples
There is no need to install CUDA and cudnn manually. You can install tensorflow GPU through a one-line program. Take tensorflow gpu2.0.0, cuda10.0, cudnn7.6.5 as examples
2022-07-27 05:00:00 【zycnice】
stay anaconda prompt In program base In the environment :
# Create a tf2 Virtual environment for , And according to the preset environment name tensorflow-gpu
# Automatic installation CUDA,cuDNN,TensorFlow GPU etc.
conda create -n tf2 tensorflow-gpu==2.0.0
# Activate tf2 A virtual environment conda activate tf2
conda activate tf2
This quick installation method is called minimalist installation method . This is also used Anaconda The convenience of distribution The place of . Installed via minimalist TensorFlow, When using, you need to activate the corresponding virtual environment , This needs to be connected with Standard Edition differentiation . The standard version is installed on Anaconda The default environment for base in , Generally, manual activation is not required base Ring habitat .
# Use Tsinghua source to install common python library
pip install -U ipython numpy matplotlib pillow pandas -i https://pypi.tuna.tsinghua.edu.cn/simple
TensorFlow At run time , By default, it will occupy all GPU Video memory resources , This is very unfriendly behavior , especially When the computer has multiple users or programs at the same time GPU Resource time , Take all of GPU Video memory resources will make Other programs cannot run . therefore , General recommended settings TensorFlow The video memory occupation mode of is the increasing occupation mode , That is, apply for video memory resources according to the actual model size , The code implementation is as follows :
gpus = tf.config.experimental.list_physical_devices('GPU')
if gpus:
try:
# Set up GPU Growth occupancy
for gpu in gpus:
tf.config.experimental.set_memory_growth(gpu, True)
except RuntimeError as e:
# Printing exception
print(e)
边栏推荐
- 双向重发布实验
- 多态的详讲
- Solution: read the files with different names in the two folders and deal with the files with different mappings
- HCIA dynamic routing rip basic experiment
- Structural mode - facade mode
- Network protocol details: IP
- JS day 2 (variables, variable usage, naming rules, syntax extensions)
- 一道数学题,让芯片巨头亏了5亿美金
- 「Photoshop2021入门教程」调整图片到不同的长宽比
- Summary of fire safety training materials
猜你喜欢
![[C language] dynamic memory management](/img/20/3970cd2112204774a37b5a1d3bdce0.png)
[C language] dynamic memory management

MySQL下载安装 & 完美卸载

TCP three handshakes and four disconnects

ps怎么导入lut预设?Photoshop导入lut调色预设教程

Safety fourth after class exercise

【C语言】自定义类型详解(结构体+枚举+联合)

一道数学题,让芯片巨头亏了5亿美金

Interesting C language

Plato farm is expected to further expand its ecosystem through elephant swap

日落红暖色调调色滤镜luts预设Sunset LUTs 1
随机推荐
如何重置Photoshop首选项?ps重置首选项的方法
Dry goods | how can independent station operation improve online chat customer service?
How can I index the Oracle database field date?
「Photoshop2021入门教程」对齐与分布制作波点图案
What if Photoshop prompts that the temporary storage disk is full? How to solve the problem that PS temporary storage disk is full?
Structural mode - adapter mode
Ref Hook
Idea 如何新建一个groovy的项目(图文详细解释)
自定义视口高度,多余的部分使用滚动
Solution to the third game of 2022 Hangzhou Electric Multi school league
STM32_ HAL_ SUMMARY_ NOTE
Easy to use mobile app automation testing framework where to find? Just collect this list!
【C语言】动态内存管理
Basic configuration of static routing to achieve network wide accessibility
TCP three handshakes and four disconnects
.htaccess学习
Dynamic routing configuration
Shift right of negative numbers
C language address book management system (linked list, segmented storage of mobile phone numbers, TXT file access, complete source code)
Photoshop各历史版本回顾以及系统要求