浏览代码

initialize trainer step count (#2498)

* initialize trainer step count

* remove step init from RLTrainer
/develop-gpu-test
GitHub 5 年前
当前提交
25926795
共有 2 个文件被更改,包括 1 次插入1 次删除
  1. 1
      ml-agents/mlagents/trainers/rl_trainer.py
  2. 1
      ml-agents/mlagents/trainers/trainer.py

1
ml-agents/mlagents/trainers/rl_trainer.py


def __init__(self, *args, **kwargs):
super(RLTrainer, self).__init__(*args, **kwargs)
self.step = 0
# Make sure we have at least one reward_signal
if not self.trainer_parameters["reward_signals"]:
raise UnityTrainerException(

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


self.summary_writer = tf.summary.FileWriter(self.summary_path)
self._reward_buffer: Deque[float] = deque(maxlen=reward_buff_cap)
self.policy: Policy = None
self.step: int = 0
def check_param_keys(self):
for k in self.param_keys:

正在加载...
取消
保存