浏览代码

vince's fix for model step (#1329)

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

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


"""
raise UnityTrainerException("The update_model method was not implemented.")
def save_model(self, steps):
def save_model(self):
:param steps: The number of steps of training
self.policy.save_model(steps)
self.policy.save_model(self.get_step)
def export_model(self):
"""

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


:param saver: Tensorflow saver for session.
"""
for brain_name in self.trainers.keys():
self.trainers[brain_name].save_model(steps)
self.trainers[brain_name].save_model()
self.logger.info('Saved Model')
def _export_graph(self):

正在加载...
取消
保存