浏览代码

Turn down gain on GAIL discriminator output (#4762)

/MLA-1734-demo-provider
GitHub 4 年前
当前提交
a73f7d73
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 2
      ml-agents/mlagents/trainers/tests/torch/test_reward_providers/test_gail.py
  2. 2
      ml-agents/mlagents/trainers/torch/components/reward_providers/gail_reward_provider.py

2
ml-agents/mlagents/trainers/tests/torch/test_reward_providers/test_gail.py


init_reward_expert = gail_rp.evaluate(buffer_expert)[0]
init_reward_policy = gail_rp.evaluate(buffer_policy)[0]
for _ in range(10):
for _ in range(20):
gail_rp.update(buffer_policy)
reward_expert = gail_rp.evaluate(buffer_expert)[0]
reward_policy = gail_rp.evaluate(buffer_policy)[0]

2
ml-agents/mlagents/trainers/torch/components/reward_providers/gail_reward_provider.py


)
self._estimator = torch.nn.Sequential(
linear_layer(estimator_input_size, 1), torch.nn.Sigmoid()
linear_layer(estimator_input_size, 1, kernel_gain=0.2), torch.nn.Sigmoid()
)
def get_action_input(self, mini_batch: AgentBuffer) -> torch.Tensor:

正在加载...
取消
保存