浏览代码

adding weight decay for experimentation

/exp-weight-decay
vincentpierre 4 年前
当前提交
115e944b
共有 2 个文件被更改,包括 5 次插入3 次删除
  1. 4
      ml-agents/mlagents/trainers/ppo/optimizer_torch.py
  2. 4
      ml-agents/mlagents/trainers/sac/optimizer_torch.py

4
ml-agents/mlagents/trainers/ppo/optimizer_torch.py


)
self.optimizer = torch.optim.Adam(
params, lr=self.trainer_settings.hyperparameters.learning_rate
params,
lr=self.trainer_settings.hyperparameters.learning_rate,
weight_decay=1e-6,
)
self.stats_name_to_update_name = {
"Losses/Value Loss": "value_loss",

4
ml-agents/mlagents/trainers/sac/optimizer_torch.py


self.trainer_settings.max_steps,
)
self.policy_optimizer = torch.optim.Adam(
policy_params, lr=hyperparameters.learning_rate
policy_params, lr=hyperparameters.learning_rate, weight_decay=1e-6
value_params, lr=hyperparameters.learning_rate
value_params, lr=hyperparameters.learning_rate, weight_decay=1e-6
)
self.entropy_optimizer = torch.optim.Adam(
self._log_ent_coef.parameters(), lr=hyperparameters.learning_rate

正在加载...
取消
保存