调试
This commit is contained in:
parent
9e5134628e
commit
e994b2ff20
@ -106,7 +106,7 @@ def train(hyp, opt, device, data_list,id,callbacks): # hyp is path/to/hyp.yaml
|
||||
(wd.parent if evolve else wd).mkdir(parents=True, exist_ok=True) # make dir
|
||||
# 获取版本号,项目名称
|
||||
#version, pro_name = get_version_name(pro)
|
||||
best = opt.savemodel#w + pro_name + '_' + 'R-ODY' + version + '.pt'
|
||||
best = Path(opt.savemodel)#w + pro_name + '_' + 'R-ODY' + version + '.pt'
|
||||
#last, best = w / 'last.pt', w / 'best.pt'
|
||||
|
||||
# Hyperparameters
|
||||
@ -468,7 +468,7 @@ def train(hyp, opt, device, data_list,id,callbacks): # hyp is path/to/hyp.yaml
|
||||
if RANK in {-1, 0}:
|
||||
LOGGER.info(f'\n{epoch - start_epoch + 1} epochs completed in {(time.time() - t0) / 3600:.3f} hours.')
|
||||
for f in best:
|
||||
if f.exists():
|
||||
if os.path.exists(f):
|
||||
strip_optimizer(f) # strip optimizers
|
||||
if f is best:
|
||||
LOGGER.info(f'\nValidating {f}...')
|
||||
|
Loading…
Reference in New Issue
Block a user