This commit is contained in:
Glenn Jocher 2019-09-18 02:25:09 +02:00
parent e9437b2178
commit 1f2e60ff43
1 changed files with 2 additions and 2 deletions

View File

@ -75,7 +75,7 @@ def train():
nc = int(data_dict['classes']) # number of classes
# Remove previous results
for f in glob.glob('*_batch*.jpg') + glob.glob('results.txt'):
for f in glob.glob('*_batch*.jpg') + glob.glob(results_file):
os.remove(f)
# Initialize model
@ -120,7 +120,7 @@ def train():
# load results
if chkpt.get('training_results') is not None:
with open('results.txt', 'w') as file:
with open(results_file, 'w') as file:
file.write(chkpt['training_results']) # write results.txt
start_epoch = chkpt['epoch'] + 1