Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
Glenn Jocher 2019-09-04 09:20:03 +02:00
parent 976eea04bd
commit 6cd98c46d8
1 changed files with 4 additions and 4 deletions

View File

@ -66,6 +66,10 @@ def train():
train_path = data_dict['train']
nc = int(data_dict['classes']) # number of classes
# Remove previous results
for f in glob.glob('*_batch*.jpg') + glob.glob('results.txt'):
os.remove(f)
# Initialize model
model = Darknet(cfg, arc=opt.arc).to(device)
@ -183,10 +187,6 @@ def train():
pin_memory=True,
collate_fn=dataset.collate_fn)
# Remove previous results
for f in glob.glob('*_batch*.jpg') + glob.glob('results.txt'):
os.remove(f)
# Start training
model.nc = nc # attach number of classes to model
model.arc = opt.arc # attach yolo architecture