From 5362e8254e934bc90eca8520de313a58dff02eff Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Fri, 13 Mar 2020 10:20:52 -0700 Subject: [PATCH] updates --- test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test.py b/test.py index 5e505491..845abfb3 100644 --- a/test.py +++ b/test.py @@ -127,8 +127,8 @@ def test(cfg, for di, d in enumerate(pred): jdict.append({'image_id': image_id, 'category_id': coco91class[int(d[5])], - 'bbox': [round(x, 3) for x in box[di]], - 'score': round(d[4], 5)}) + 'bbox': [round(x, 3) for x in box[di].tolist()], + 'score': round(d[4].item(), 5)}) # Assign all predictions as incorrect correct = torch.zeros(pred.shape[0], niou, dtype=torch.bool, device=device)