Ensures weights/ dir exists

Allows train.py to be run outside of yolov5/ directory.
pull/1/head
Lauritzen Kasper Primdal 5 years ago
parent 099e6f5ebd
commit c3d4d321d3

@ -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'

Loading…
Cancel
Save