We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 51abb23 commit d907223Copy full SHA for d907223
ml-agents/mlagents/trainers/trainer_controller.py
@@ -291,7 +291,10 @@ def start_learning(self):
291
292
tf.reset_default_graph()
293
294
- with tf.Session() as sess:
+ # Prevent a single session from taking all GPU memory.
295
+ config = tf.ConfigProto()
296
+ config.gpu_options.allow_growth = True
297
+ with tf.Session(config=config) as sess:
298
self._initialize_trainers(trainer_config, sess)
299
for _, t in self.trainers.items():
300
self.logger.info(t)
0 commit comments