This commit is contained in:
Glenn Jocher 2019-04-17 19:04:01 +02:00
parent 319c0988cc
commit 2ed0de9785
1 changed files with 5 additions and 0 deletions

View File

@ -305,6 +305,11 @@ if __name__ == '__main__':
x = (np.random.randn(1) * 0.3 + 1) ** 1.1 # plt.hist(x.ravel(), 100)
hyp[k] = hyp[k] * float(x) # vary by about 30% 1sigma
# Apply limits
hyp['iou_t'] = np.clip(hyp['iou_t'], 0, 0.90)
hyp['momentum'] = np.clip(hyp['momentum'], 0, 0.98)
hyp['weight_decay'] = np.clip(hyp['weight_decay'], 0, 0.01)
# Normalize loss components (sum to 1)
lcf = ['xy', 'wh', 'cls', 'conf']
s = sum([v for k, v in hyp.items() if k in lcf])