浏览代码

Fix on the bc_offline_training using deep copies

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

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


# Contains an implementation of Behavioral Cloning Algorithm
import logging
import copy
from mlagents.trainers.bc.trainer import BCTrainer
from mlagents.trainers.demo_loader import demo_to_buffer

trainer_parameters['demo_path'],
self.policy.sequence_length)
policy_brain = brain.__dict__
expert_brain = brain_params.__dict__
policy_brain = copy.deepcopy(brain.__dict__)
expert_brain = copy.deepcopy(brain_params.__dict__)
policy_brain.pop('brain_name')
expert_brain.pop('brain_name')
if expert_brain != policy_brain:

正在加载...
取消
保存