浏览代码

[skip ci] adding should_still_train method to ppo

/release_3_distributed
Anupam Bhatnagar 4 年前
当前提交
8b6c19ae
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8
      ml-agents/mlagents/trainers/ppo/trainer.py

8
ml-agents/mlagents/trainers/ppo/trainer.py


self.seed = seed
self.policy: NNPolicy = None # type: ignore
def should_still_train(self) -> bool:
"""
Returns whether or not the trainer should train. A Trainer could
stop training if it wasn't training to begin with, or if max_steps
is reached.
"""
return self.is_training and self.get_step <= self.trainer_settings.max_steps
def _process_trajectory(self, trajectory: Trajectory) -> None:
"""
Takes a trajectory and processes it, putting it into the update buffer.

正在加载...
取消
保存