浏览代码

Fix crash in trainer tests (trainer_metrics)

/0.10.1
Ervin Teng 5 年前
当前提交
df44ee8d
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2
      ml-agents/mlagents/trainers/tests/test_ppo.py

2
ml-agents/mlagents/trainers/tests/test_ppo.py


buffer.update_buffer["extrinsic_returns"] = buffer.update_buffer["rewards"]
buffer.update_buffer["extrinsic_value_estimates"] = buffer.update_buffer["rewards"]
trainer.training_buffer = buffer
# Make sure trainer_metrics doesn't crash
trainer.trainer_metrics.last_mean_return = 0
trainer.update_policy()
# Make batch length a larger multiple of sequence length
trainer.trainer_parameters["batch_size"] = 128

正在加载...
取消
保存