提交 ad4c22cb authored 作者: Glenn Jocher's avatar Glenn Jocher

--resume bug fix #187

上级 b9da3ea4
......@@ -133,9 +133,13 @@ def train(hyp):
with open(results_file, 'w') as file:
file.write(ckpt['training_results']) # write results.txt
# epochs
start_epoch = ckpt['epoch'] + 1
assert opt.epochs > start_epoch, '%s has already trained %g epochs. --epochs must be greater than %g' % \
(opt.weights, ckpt['epoch'], ckpt['epoch'])
if epochs < start_epoch:
print('%s has been trained for %g epochs. Fine-tuning for %g additional epochs.' %
(opt.weights, ckpt['epoch'], epochs))
epochs += ckpt['epoch'] # finetune additional epochs
del ckpt
# Mixed precision training https://github.com/NVIDIA/apex
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论