From bb383913423abf3ada74a658543bdf9eaf5a4c25 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Fri, 12 Jul 2019 14:28:46 +0200 Subject: [PATCH] updates --- test.py | 4 ++-- train.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test.py b/test.py index bd4f2675..e1563d26 100644 --- a/test.py +++ b/test.py @@ -54,10 +54,10 @@ def test( seen = 0 model.eval() coco91class = coco80_to_coco91_class() - print(('%30s' + '%10s' * 6) % ('Class', 'Images', 'Targets', 'P', 'R', 'mAP', 'F1')) + s = ('%30s' + '%10s' * 6) % ('Class', 'Images', 'Targets', 'P', 'R', 'mAP', 'F1') loss, p, r, f1, mp, mr, map, mf1 = 0., 0., 0., 0., 0., 0., 0., 0. jdict, stats, ap, ap_class = [], [], [], [] - for batch_i, (imgs, targets, paths, shapes) in enumerate(tqdm(dataloader, desc='Computing mAP')): + for batch_i, (imgs, targets, paths, shapes) in enumerate(tqdm(dataloader, desc=s)): targets = targets.to(device) imgs = imgs.to(device) _, _, height, width = imgs.shape # batch size, channels, height, width diff --git a/train.py b/train.py index 36cb7db4..f53273c9 100644 --- a/train.py +++ b/train.py @@ -348,7 +348,7 @@ if __name__ == '__main__': # Mutate init_seeds(seed=int(time.time())) - s = [.15, .15, .15, .15, .15, .15, .15, .15, .15, .15, .15, .15] # fractional sigmas + s = [.15, .15, .15, .15, .15, .15, .15, .15, .10, .10, .10, .10] # fractional sigmas for i, k in enumerate(hyp.keys()): x = (np.random.randn(1) * s[i] + 1) ** 2.0 # plt.hist(x.ravel(), 300) hyp[k] *= float(x) # vary by 20% 1sigma