This commit is contained in:
Glenn Jocher 2019-06-12 15:12:08 +02:00
parent c5cb3c8a9e
commit b33a0b6cf2
1 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ from utils.datasets import *
from utils.utils import * from utils.utils import *
# Hyperparameters: train.py --evolve --epochs 2 --img-size 320, Metrics: 0.204 0.302 0.175 0.234 (square smart) # Hyperparameters: train.py --evolve --epochs 2 --img-size 320, Metrics: 0.204 0.302 0.175 0.234 (square smart)
hyp = {'xy': 0.2, # xy loss gain (giou is about 0.02) hyp = {'xy': 0.1, # xy loss gain (giou is about 0.02)
'wh': 0.1, # wh loss gain 'wh': 0.1, # wh loss gain
'cls': 0.04, # cls loss gain 'cls': 0.04, # cls loss gain
'conf': 4.5, # conf loss gain 'conf': 4.5, # conf loss gain
@ -356,7 +356,7 @@ if __name__ == '__main__':
# Mutate hyperparameters # Mutate hyperparameters
old_hyp = hyp.copy() old_hyp = hyp.copy()
init_seeds(seed=int(time.time())) init_seeds(seed=int(time.time()))
s = [.3, .3, .3, .3, .3, .3, .3, .03, .3] s = [.3, .3, .3, .3, .3, .3, .3, .03, .3] # xy, wh, cls, conf, iou_t, lr0, lrf, weight_decay
for i, k in enumerate(hyp.keys()): for i, k in enumerate(hyp.keys()):
x = (np.random.randn(1) * s[i] + 1) ** 1.1 # plt.hist(x.ravel(), 100) x = (np.random.randn(1) * s[i] + 1) ** 1.1 # plt.hist(x.ravel(), 100)
hyp[k] = hyp[k] * float(x) # vary by about 30% 1sigma hyp[k] = hyp[k] * float(x) # vary by about 30% 1sigma