Skip to content

Commit

Permalink
--resume training from URL weights fix (#8884)
Browse files Browse the repository at this point in the history
--resume training from URL weights fix

@kalenmike should fix data error on HUB resume
  • Loading branch information
glenn-jocher committed Aug 5, 2022
1 parent e073658 commit daed7a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions train.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,8 +496,8 @@ def main(opt, callbacks=Callbacks()):
d = torch.load(last, map_location='cpu')['opt']
opt = argparse.Namespace(**d) # replace
opt.cfg, opt.weights, opt.resume = '', str(last), True # reinstate
if is_url(opt.data):
opt.data = str(opt_data) # avoid HUB resume auth timeout
if is_url(opt_data):
opt.data = check_file(opt_data) # avoid HUB resume auth timeout
else:
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
Expand Down

0 comments on commit daed7a8

Please sign in to comment.