【发布时间】:2016-02-25 10:49:23
【问题描述】:
是否可以在 Python 中或通过设置环境变量等来更改默认 Session 配置?
我特别想要
with tf.Session() as sess:
...
当我与其他作业并行运行小型侧面测试时,使用的内存要少得多。所以我希望上面的行为与
gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction=0.1)
config = tf.ConfigProto(gpu_options=gpu_options)
with tf.Session(config=config) as sess:
...
【问题讨论】:
标签: python tensorflow