浏览代码

Fix crash with VAIL + GAIL (#2598)

/develop-gpu-test
GitHub 5 年前
当前提交
149ebd67
共有 2 个文件被更改,包括 2 次插入1 次删除
  1. 2
      ml-agents/mlagents/trainers/components/reward_signals/gail/model.py
  2. 1
      ml-agents/mlagents/trainers/tests/test_reward_signals.py

2
ml-agents/mlagents/trainers/components/reward_signals/gail/model.py


new_beta = tf.maximum(
self.beta + self.alpha * (self.kl_loss - self.mutual_information), EPSILON
)
with tf.control_dependencies(self.update_batch):
with tf.control_dependencies([self.update_batch]):
self.update_beta = tf.assign(self.beta, new_beta)
def make_inputs(self) -> None:

1
ml-agents/mlagents/trainers/tests/test_reward_signals.py


"strength": 0.1,
"gamma": 0.9,
"encoding_size": 128,
"use_vail": True,
"demo_path": os.path.dirname(os.path.abspath(__file__)) + "/test.demo",
}
}

正在加载...
取消
保存