Unverified 提交 daed7a84 authored 作者: Glenn Jocher's avatar Glenn Jocher 提交者: GitHub

`--resume` training from URL weights fix (#8884)

--resume training from URL weights fix @kalenmike should fix data error on HUB resume
上级 e073658e
...@@ -496,8 +496,8 @@ def main(opt, callbacks=Callbacks()): ...@@ -496,8 +496,8 @@ def main(opt, callbacks=Callbacks()):
d = torch.load(last, map_location='cpu')['opt'] d = torch.load(last, map_location='cpu')['opt']
opt = argparse.Namespace(**d) # replace opt = argparse.Namespace(**d) # replace
opt.cfg, opt.weights, opt.resume = '', str(last), True # reinstate opt.cfg, opt.weights, opt.resume = '', str(last), True # reinstate
if is_url(opt.data): if is_url(opt_data):
opt.data = str(opt_data) # avoid HUB resume auth timeout opt.data = check_file(opt_data) # avoid HUB resume auth timeout
else: else:
opt.data, opt.cfg, opt.hyp, opt.weights, opt.project = \ opt.data, opt.cfg, opt.hyp, opt.weights, opt.project = \
check_file(opt.data), check_yaml(opt.cfg), check_yaml(opt.hyp), str(opt.weights), str(opt.project) # checks check_file(opt.data), check_yaml(opt.cfg), check_yaml(opt.hyp), str(opt.weights), str(opt.project) # checks
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论