浏览代码

save step on trainer step count/swap on ghost

/asymm-envs
Andrew Cohen 5 年前
当前提交
1a6e99bb
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 6
      ml-agents/mlagents/trainers/ghost/trainer.py

6
ml-agents/mlagents/trainers/ghost/trainer.py


self._learning_team = self.controller.get_learning_team(self.ghost_step)
if self.ghost_step - self.last_save > self.steps_between_save:
# Note save and swap should be on different step counters.
# We don't want to save unless the policy is learning.
if self.get_step - self.last_save > self.steps_between_save:
self.last_save = self.ghost_step
self.last_save = self.get_step
if self.ghost_step - self.last_swap > self.steps_between_swap:
self._swap_snapshots()

正在加载...
取消
保存