Tensorflow U-Net 使用太多内存

问题描述 投票:0回答:0

我正在自定义数据集上训练 U-Net CNN,但每当我训练模型时,我都会收到一条错误消息,提示内存资源已耗尽。不过,这没有意义,因为我的批量大小只有 8(512 x 512 png 图像)。

我正在使用支持 CUDA 的 GPU 开发 VS 代码。

我已经尝试了一些流行的修复程序,例如:

tf.compat.v1.reset_default_graph()

config = tf.compat.v1.ConfigProto()
config.gpu_options.allow_growth = True
sess = tf.compat.v1.InteractiveSession(config=config)

但没有任何效果

tensorflow conv-neural-network image-segmentation unet-neural-network oom
© www.soinside.com 2019 - 2024. All rights reserved.