Skip to content

Commit

Permalink
Update run_baselines_agent.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sophiagu committed Dec 16, 2020
1 parent 70d9fc6 commit 3232ae8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Scripts/run_baselines_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ def _train(env_id, model_params, total_epochs, use_sigmoid_layer=False, is_evalu
# learning rate: use 1e-7 for delta hedging and 1e-5 for mean reversion
if use_sigmoid_layer:
model = PPO2(SigmoidMlpPolicy, envs, n_steps=1, nminibatches=1,
learning_rate=lambda f: f * 1e-7, verbose=1,
policy_kwargs=dict(act_fun=tf.nn.tanh),
learning_rate=lambda f: f * 1e-5, verbose=1,
policy_kwargs=dict(act_fun=tf.nn.relu),
**model_params)
else:
model = PPO2(MlpLstmPolicy, envs, n_steps=1, nminibatches=1,
learning_rate=lambda f: f * 1e-7, verbose=1,
policy_kwargs=dict(act_fun=tf.nn.tanh),
learning_rate=lambda f: f * 1e-5, verbose=1,
policy_kwargs=dict(act_fun=tf.nn.relu),
**model_params)

model.learn(total_timesteps=total_epochs * L)
Expand Down

0 comments on commit 3232ae8

Please sign in to comment.