浏览代码

Fix seed with multiple runs (#1138)

* Fix seed with multiple runs

* addressed comments
/develop-generalizationTraining-TrainerController
GitHub 6 年前
当前提交
b7e63bd8
共有 1 个文件被更改,包括 4 次插入3 次删除
  1. 7
      ml-agents/mlagents/learn.py

7
ml-agents/mlagents/learn.py


num_runs = int(options['--num-runs'])
seed = int(options['--seed'])
if options['--env'] != 'None' and num_runs > 1:
if options['--env'] == 'None' and num_runs > 1:
run_seed = seed
seed = np.random.randint(0, 9999)
p = multiprocessing.Process(target=run_training, args=(i, seed, options))
run_seed = np.random.randint(0, 10000)
p = multiprocessing.Process(target=run_training, args=(i, run_seed, options))
jobs.append(p)
p.start()

正在加载...
取消
保存