当前位置:网站首页>Remove the restriction of video memory occupied by tensorflow GPU
Remove the restriction of video memory occupied by tensorflow GPU
2022-06-22 08:27:00 【The salted fish is turning over】
The author found that RTX3070 8G The graphics card , stay tensorflow Can only call 5488MB, Probably 5G about
Because of existence memory_limit The limitation of .
As shown in the figure :
In order to lift this restriction , Play the most important role of graphics card in deep learning , Look for methods on the Internet , Finally found a solution
As shown in the following code :
physical_gpus = tf.config.list_physical_devices("GPU")
tf.config.experimental.set_virtual_device_configuration(
physical_gpus[0],
[tf.config.experimental.VirtualDeviceConfiguration(memory_limit=6000)]
# Increase the video memory limit to 6000MB
)
logical_gpus = tf.config.list_logical_devices("GPU")
effect :
You can see , Run again tensorflow when ,gpu Training can be used 6000MB, This value can be adjusted according to your own needs .
边栏推荐
猜你喜欢

Interpreting the technology group in maker Education

Implementation and landing of any to any real-time voice change RTC dev Meetup

0 basic self-study STM32 (wildfire) -- what is a register?

Chapter VIII web project testing (the end of this chapter)

开展有效的创客教育课程与活动

Coding complexity C (n)

FastCorrect:语音识别快速纠错模型丨RTC Dev Meetup

解读创客教育中的技术一族

Basic concepts of homomorphic encryption

Nisp online simulation question bank
随机推荐
Why can't semaphores be used in interrupts and why can't interrupt context sleep
Five skills to be an outstanding cloud architect
DTD constraints
How to design the dead shot, the best and eye-catching performance of the watch Vanguard
Object to string pit
Square array cyclic right shift
Mysq index optimization and how to avoid deadlock
矩阵运算
Postgresql源码(56)可扩展类型分析ExpandedObject/ExpandedRecord
Installing SQL Server 2008 by image in Windows Service 2008
Develop steam education based on scientific skills
一文搞懂one-hot和embedding
Mysql5.6.36 tutorial
Dom4j+xpath parsing XML files
Top ten of the year! Saining network security was once again shortlisted in the top 100 report on China's digital security
377. combined total Ⅳ
Implementation and landing of any to any real-time voice change RTC dev Meetup
PostgreSQL source code (56) extensible type analysis expandedobject/expandedrecord
一文彻底搞懂My SQL索引知识点
Oracle database pl/sql procedure body, cursor, stored procedure