Skip to content

Commit

Permalink
lr 0.01 l2 1e-5 c_puct 1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
bupticybee committed Jan 2, 2019
1 parent 03b5be8 commit 1be5cfb
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions config/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
train_epoch = 1
batch_size = 256
noup_flag = 'noup'
c_puct = 1.5

non_cap_draw_round = 120
sl_epoch = 30
Expand Down
2 changes: 1 addition & 1 deletion net/resnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def get_model(MODEL_NAME,labels,GPU_CORE = [0],BATCH_SIZE = 512,NUM_RES_LAYERS =
labels=score[ind * (BATCH_SIZE // len(GPU_CORE)):(ind + 1) * (BATCH_SIZE // len(GPU_CORE))],
predictions=value_head)
value_loss = tf.reduce_mean(value_loss)
regularizer = tf.contrib.layers.l2_regularizer(scale=1e-4)
regularizer = tf.contrib.layers.l2_regularizer(scale=1e-5)
regular_variables = tf.trainable_variables()
l2_loss = tf.contrib.layers.apply_regularization(regularizer, regular_variables)
multitarget_loss = value_loss + policy_loss + l2_loss
Expand Down
6 changes: 3 additions & 3 deletions scripts/daily_update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ sh kill_all.sh
#sleep 10s
#sh multithread_start.sh -p /usr/local/bin/python3 -g 1 -t 20 -n no
sleep 10s
/usr/local/bin/python3 model_update.py -g 0 > update_log.txt
/usr/local/bin/python3 model_update.py -g 1 > update_log.txt
sleep 10s
sh kill_all.sh
sleep 10s
/usr/local/bin/python3 upweight.py > uplog.tt
sleep 10s
sh validate.sh -p /usr/local/bin/python3 -g 0 -t 20 > validate_log.txt #&
sh validate.sh -p /usr/local/bin/python3 -g 1 -t 20 > validate_log.txt #&
#sh validate.sh -p /usr/local/bin/python3 -g 1 -t 20 > validate_log.txt
sleep 10s
#/usr/local/bin/python3 check_ifup.py > uplog.tt
Expand All @@ -27,4 +27,4 @@ sh kill_all.sh
#sleep 10s
#sh multithread_start.sh -p /usr/local/bin/python3 -g 1 -t 20 -n no
sleep 10s
sh multithread_start.sh -p /usr/local/bin/python3 -g 0 -t 5
sh multithread_start.sh -p /usr/local/bin/python3 -g 1 -t 5
1 change: 1 addition & 0 deletions scripts/icyChess_selfplay.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
distributed_server='{}:{}'.format(conf.server,conf.port),
n_playout=conf.train_playout,
recoard_dir=conf.distributed_datadir,
c_puct=conf.c_puct,
distributed_dir=conf.download_weight_dir,
dnoise=True,
is_selfplay=True,
Expand Down
2 changes: 1 addition & 1 deletion scripts/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@

number_played = len(os.listdir(recoard_dir))
while number_played < conf.validate_gameplay:
vg = ValidationGames(network_w=netold,network_b=netnew,white_name='oldnet',black_name='newnet',play_times=1,recoard_dir=recoard_dir,n_playout=conf.val_playout,temp_round=conf.val_temp_round)
vg = ValidationGames(network_w=netold,network_b=netnew,white_name='oldnet',black_name='newnet',play_times=1,recoard_dir=recoard_dir,n_playout=conf.val_playout,temp_round=conf.val_temp_round,c_puct=conf.c_puct)
vg.play()
number_played = len(os.listdir(recoard_dir))
print("played {} th game".format(number_played))

0 comments on commit 1be5cfb

Please sign in to comment.