From 2ed0de9785d502c8c4b75035e27f899ce9d18b29 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Wed, 17 Apr 2019 19:04:01 +0200 Subject: [PATCH] updates --- train.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/train.py b/train.py index 7ff15b7d..8c386687 100644 --- a/train.py +++ b/train.py @@ -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])