【发布时间】:2017-03-16 07:17:30
【问题描述】:
在 tensorflow 中训练小型模型(
【问题讨论】:
-
减少批处理大小并使用时间线查看内存的去向 (tl.generate_chrome_trace_format(show_memory=True..))
标签: tensorflow gpu
在 tensorflow 中训练小型模型(
【问题讨论】:
标签: tensorflow gpu
默认情况下,张量流可以增长到所有 GPU 内存的总和。 您可以通过为 Session 设置配置来限制它:
gpu_memory_fraction = 0.4 # Fraction of GPU memory to use
config = tf.ConfigProto(gpu_options=
tf.GPUOptions(per_process_gpu_memory_fraction=gpu_memory_fraction))
sess = tf.Session(config=config)
【讨论】: