浏览代码

Merge pull request #16 from ASPePeX/keep-checkpoints

--keep-checkpoints=<n> option for ppo.py
/develop-generalizationTraining-TrainerController
GitHub 7 年前
当前提交
64037ccb
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 4
      python/ppo.py

4
python/ppo.py


--learning-rate=<rate> Model learning rate [default: 3e-4].
--hidden-units=<n> Number of units in hidden layer [default: 64].
--batch-size=<n> How many experiences per gradient descent update step [default: 64].
--keep-checkpoints=<n> How many model checkpoints to keep [default: 5].
'''
options = docopt(_USAGE)

summary_freq = int(options['--summary-freq'])
save_freq = int(options['--save-freq'])
env_name = options['<env>']
keep_checkpoints = int(options['--keep-checkpoints'])
# Algorithm-specific parameters for tuning
gamma = float(options['--gamma'])

os.makedirs(summary_path)
init = tf.global_variables_initializer()
saver = tf.train.Saver()
saver = tf.train.Saver(max_to_keep=keep_checkpoints)
with tf.Session() as sess:
# Instantiate model parameters

正在加载...
取消
保存