keras 设置GPU使用率

import tensorflow as tf
from keras.backend.tensorflow_backend import set_session

config = tf.ConfigProto()
config.gpu_options.allocator_type = ‘BFC’ #A “Best-fit with coalescing” algorithm, simplified from a version of dlmalloc.

config.gpu_options.per_process_gpu_memory_fraction = 0.3
config.gpu_options.allow_growth = True
set_session(tf.Session(config=config))

Original: https://www.cnblogs.com/to-creat/p/8094174.html
Author: Wei_java
Title: keras 设置GPU使用率

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/9558/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

最近整理资源【免费获取】:   👉 程序员最新必读书单  | 👏 互联网各方向面试题下载 | ✌️计算机核心资源汇总