当前位置:网站首页>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)
边栏推荐
- static和final关键字 学习 demo练习
- 小程序项目如何创建
- Open the door of programming
- IP 14th day notes
- 项目对接支付宝支付,内网穿透实现监听支付宝的支付成功异步回调通知
- 利用Power Automate,轻松下载Power BI报告中的数据
- 使用mq消息队列来进行下单流程的高并发设计,消息挤压,消息丢失,消息重复的产生场景和解决方案
- Bo Yun container cloud and Devops platform won the trusted cloud "technology best practice Award"
- Structural mode - facade mode
- 【AtCoder Beginner Contest 260 (A·B·C)】
猜你喜欢

strlen和sizeof的区别

kali系统arp介绍(断网嗅探密码抓包)

Plato Farm有望通过Elephant Swap,进一步向外拓展生态

The price reduction of iphone13 is just a show. Consumers are waiting for iphone14

MySQL下载安装 & 完美卸载

2019 top tennis cup upload

会议OA之我的审批

Comprehensive experiment of static routing

Knowledge about hash index and b+ tree

Comprehensive experiment of static routing
随机推荐
2019强网杯upload
打开编程的大门
Dynamic routing configuration
在有序数组找具体某个数字
Review of various historical versions of Photoshop and system requirements
Shift right of negative numbers
RN development series < 9 > --mobx (1) Introduction
【AtCoder Beginner Contest 260 (A·B·C)】
Hiding skills of Photoshop clipping tool
R-score reproduction R-Precision evaluation index quantitative text generation image r-score quantitative experiment whole process reproduction (R-Precision) quantitative evaluation experiment step on
STM32_ HAL_ SUMMARY_ NOTE
[search] flood fill and shortest path model
IIC communication protocol (I)
Affine transformation module and conditional batch Standardization (CBN) of detailed text generated images
Solution: read the files with different names in the two folders and deal with the files with different mappings
[error reporting]: cannot read properties of undefined (reading 'prototype')
ps怎么导入lut预设?Photoshop导入lut调色预设教程
Visualization domain svg
Qstring conversion char*
[error reporting] cannot read property 'parsecomponent' of undefined