第五章 模型和训练 | 协同学习及选拔机制
协同学习及选拔机制
在原始模型训练基础上进行选拔,不同阶段提拔更多优秀模型进入专家组进行实战:
海选训练阶段:
多轮基础网络训练,多轮强化学习,优胜劣汰,保留足够成员,保留多样性基因。
多线程同时训练。
pool = []
for dir in all_subdir:
if '-' not in dir and '.' not in dir:
# train only if the log dir does not exist
if not str.isdigit(dir):
return
# NOTE: logfile is for compatibility reason
if not (os.path.isdir("./"+train_dir+"/"+dir+"/tensorboard") or os.path.isdir("./"+train_dir+"/"+dir+"/logfile")):
p = Process(target=train_multiple, args=(
"./" + train_dir &#