Commit 66c87674 authored by lli's avatar lli
Browse files

update

parent 8d49c5df
......@@ -3,6 +3,7 @@ from itertools import product
# Define different learning rates for learning rate tuning
parameters = dict(
n_hidden=[32, 64, 128],
policy_lr=[0.001, 0.0001, 0.00001],
value_lr=[0.01, 0.001, 0.0001, 0.00001]
)
......@@ -10,13 +11,14 @@ parameters = dict(
param_values = [v for v in parameters.values()]
print(param_values)
for policy_lr, value_lr in product(*param_values):
print(policy_lr, value_lr)
for n_hidden, policy_lr, value_lr in product(*param_values):
print(n_hidden, policy_lr, value_lr)
# Generate different learning rate combinations
for run_id, (policy_lr, value_lr) in enumerate(product(*param_values)):
for run_id, (n_hidden, policy_lr, value_lr) in enumerate(product(*param_values)):
print('Run id: ', run_id + 1)
print('Number of hidden neurons: ', n_hidden)
print('Policy learning rate: ', policy_lr)
print('Value learning rate: ', value_lr)
os.system(
f"python train_reinforce.py --save_path {run_id + 1} --n_hidden 128 --lr_policy {policy_lr} --lr_value {value_lr} --n_episode 50000 ")
f"python train_reinforce.py --save_path {run_id + 1} --n_hidden {n_hidden} --lr_policy {policy_lr} --lr_value {value_lr} --n_episode 50000 ")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment