浏览代码

When checking for the compatibility of the expert brain with the policy brain, we will remove the action descriptions from the dictionary of things we need to compare. This is to prevent the case where a user has different descriptions for his actions but still wants to train a brain using expert demonstrations. (#2517)

/develop-gpu-test
Chris Elion 5 年前
当前提交
3cb1755e
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2
      ml-agents/mlagents/trainers/bc/offline_trainer.py

2
ml-agents/mlagents/trainers/bc/offline_trainer.py


expert_brain = copy.deepcopy(brain_params.__dict__)
policy_brain.pop("brain_name")
expert_brain.pop("brain_name")
policy_brain.pop("vector_action_descriptions")
expert_brain.pop("vector_action_descriptions")
if expert_brain != policy_brain:
raise UnityTrainerException(
"The provided demonstration is not compatible with the "
正在加载...
取消
保存