def accumulate_gradient(self, feedback='teacher', **kwargs):
    if (feedback == 'teacher'):
        self.feedback = 'teacher'
        self.rollout(train_ml=args.teacher_weight, train_rl=False, **kwargs)
    elif (feedback == 'sample'):
        self.feedback = 'teacher'
        self.rollout(train_ml=args.ml_weight, train_rl=False, **kwargs)
        self.feedback = 'sample'
        self.rollout(train_ml=None, train_rl=True, **kwargs)
    else:
        assert False
def accumulate_gradient(self, feedback='teacher', **kwargs):
    if (feedback == 'teacher'):
        self.feedback = 'teacher'
        self.rollout(train_ml=args.teacher_weight, train_rl=False, **kwargs)
    elif (feedback == 'sample'):
        self.feedback = 'teacher'
        self.rollout(train_ml=args.ml_weight, train_rl=False, **kwargs)
        self.feedback = 'sample'
        self.rollout(train_ml=None, train_rl=True, **kwargs)
    else:
        assert False