--resume training from URL weights (#8882)

@kalenmike
This commit is contained in:
Glenn Jocher authored and GitHub committed 2022-08-05 16:27:28 +02:00
1 parent bc9fcb1767
commit e073658e11
1 file changed
+2 -3
+2 -3
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():