From e073658e119dac7bd0bdb209ababc90121c6450d Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Fri, 5 Aug 2022 16:27:28 +0200 Subject: [PATCH] `--resume` training from URL weights (#8882) @kalenmike --- train.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/train.py b/train.py index 17d16dba1531..023a39b6c579 100644 --- a/train.py +++ b/train.py @@ -485,9 +485,8 @@ def main(opt, callbacks=Callbacks()): check_requirements(exclude=['thop']) # Resume - if opt.resume and not (check_wandb_resume(opt) or opt.evolve): # resume an interrupted run - last = Path(opt.resume if isinstance(opt.resume, str) else get_latest_run()) # specified or most recent last.pt - assert last.is_file(), f'ERROR: --resume checkpoint {last} does not exist' + if opt.resume and not (check_wandb_resume(opt) or opt.evolve): # resume from specified or most recent last.pt + last = Path(check_file(opt.resume) if isinstance(opt.resume, str) else get_latest_run()) opt_yaml = last.parent.parent / 'opt.yaml' # train options yaml opt_data = opt.data # original dataset if opt_yaml.is_file():