updates
This commit is contained in:
parent
1aedf27886
commit
04a0a6f609
6
train.py
6
train.py
|
@ -367,8 +367,10 @@ def train():
|
|||
# end epoch ----------------------------------------------------------------------------------------------------
|
||||
|
||||
# end training
|
||||
if len(opt.name) and not opt.prebias:
|
||||
fresults, flast, fbest = 'results%s.txt' % opt.name, 'last%s.pt' % opt.name, 'best%s.pt' % opt.name
|
||||
n = opt.name
|
||||
if len(n) and not opt.prebias:
|
||||
n = '_' + n if not n.isnumeric() else n
|
||||
fresults, flast, fbest = 'results%s.txt' % n, 'last%s.pt' % n, 'best%s.pt' % n
|
||||
os.rename('results.txt', fresults)
|
||||
os.rename(wdir + 'last.pt', wdir + flast) if os.path.exists(wdir + 'last.pt') else None
|
||||
os.rename(wdir + 'best.pt', wdir + fbest) if os.path.exists(wdir + 'best.pt') else None
|
||||
|
|
Loading…
Reference in New Issue