【问题标题】:Allocating gpu fraction eager execution分配 gpu 部分急切执行
【发布时间】:2019-02-01 11:23:53
【问题描述】:

基本上,我在 Eager 模式下运行强化学习模型,我需要限制每个进程将从 GPU 中获得的内存量。在图形 api 中,这可以通过修改 tf.ConfigProto() 对象并与该配置对象创建会话来实现。

但是,在 Eager api 中,没有会话。那么我的疑问是,在这种情况下我该如何管理 gpu 内存?

【问题讨论】:

    标签: python tensorflow keras deep-learning


    【解决方案1】:

    tf.enable_eager_execution() 接受 config 参数,其值将与 ConfigProto 消息相同。

    因此,您应该能够使用它为每个进程设置相同的选项。

    希望对您有所帮助。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-01-27
      • 2011-05-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多