浏览代码

Add fix for multiple instances on a single GPU (#1192)

/develop-generalizationTraining-TrainerController
GitHub 6 年前
当前提交
2af80543
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 5
      ml-agents/mlagents/trainers/trainer_controller.py

5
ml-agents/mlagents/trainers/trainer_controller.py


tf.reset_default_graph()
with tf.Session() as sess:
# Prevent a single session from taking all GPU memory.
config = tf.ConfigProto()
config.gpu_options.allow_growth = True
with tf.Session(config=config) as sess:
self._initialize_trainers(trainer_config, sess)
for _, t in self.trainers.items():
self.logger.info(t)

正在加载...
取消
保存