From 1f2e60ff4396bba2be262d98c2370b084b304728 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Wed, 18 Sep 2019 02:25:09 +0200 Subject: [PATCH] updates --- train.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/train.py b/train.py index 0b22c019..5a8ad401 100644 --- a/train.py +++ b/train.py @@ -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