This commit is contained in:
Glenn Jocher 2019-07-24 20:16:35 +02:00
parent ce8a597dab
commit db08ac5403
2 changed files with 8 additions and 2 deletions

View File

@ -379,8 +379,8 @@ if __name__ == '__main__':
if opt.bucket:
os.system('gsutil cp gs://%s/evolve.txt .' % opt.bucket) # download evolve.txt if exists
for _ in range(1000): # generations to evolve
if os._exists('evolve.txt'): # if evolve.txt exists: select best hyps and mutate
for _ in range(2): # generations to evolve
if os.path.exists('evolve.txt'): # if evolve.txt exists: select best hyps and mutate
# Get best hyperparameters
x = np.loadtxt('evolve.txt', ndmin=2)
x = x[fitness(x).argmax()] # select best fitness hyps

View File

@ -28,6 +28,12 @@ python3 detect.py
# Test
python3 test.py --save-json
# Evolve
for i in {0..100}
do
python3 train.py --data data/coco.data --img-size 320 --epochs 1 --batch-size 64 --accumulate 1 --evolve --bucket yolov4
done
# Git pull
git pull https://github.com/ultralytics/yolov3 # master
git pull https://github.com/ultralytics/yolov3 test # branch