Ensures weights/ dir exists

Allows train.py to be run outside of yolov5/ directory.
pull/51/head
Lauritzen Kasper Primdal 2020-06-13 14:44:23 +02:00
parent 099e6f5ebd
commit c3d4d321d3
1 changed files with 1 additions and 0 deletions

View File

@ -20,6 +20,7 @@ except:
mixed_precision = False # not installed
wdir = 'weights' + os.sep # weights dir
os.makedirs(wdir, exist_ok=True)
last = wdir + 'last.pt'
best = wdir + 'best.pt'
results_file = 'results.txt'