`--resume` training from URL weights (#8882)

@kalenmike
pull/8884/head
Glenn Jocher 2022-08-05 16:27:28 +02:00 committed by GitHub
parent bc9fcb1767
commit e073658e11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -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():