From 10f8e0d60121fbc0c5df3090bec4d645f9236360 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Fri, 5 Aug 2022 16:38:27 +0200 Subject: [PATCH] --resume training from URL weights fix @kalenmike should fix data error on HUB resume --- train.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/train.py b/train.py index 023a39b6c579..c2f487afe8b0 100644 --- a/train.py +++ b/train.py @@ -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