This commit is contained in:
Glenn Jocher 2019-05-08 18:54:55 +02:00
parent 5580694970
commit 40bc015b75
1 changed files with 2 additions and 2 deletions

View File

@ -324,14 +324,14 @@ if __name__ == '__main__':
# Mutate hyperparameters
old_hyp = hyp.copy()
init_seeds(seed=int(time.time()))
s = [.2, .2, .2, .2, .3, .2, .2, .02, .3]
s = [.2, .2, .2, .2, .3, .2, .2, .03, .3]
for i, k in enumerate(hyp.keys()):
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
# Clip to limits
keys = ['iou_t', 'momentum', 'weight_decay']
limits = [(0, 0.90), (0.80, 0.95), (0, 0.01)]
limits = [(0, 0.90), (0.75, 0.95), (0, 0.01)]
for k, v in zip(keys, limits):
hyp[k] = np.clip(hyp[k], v[0], v[1])