From 894fc1c47f33d331618e0a78e09daa2434e98183 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Thu, 29 Aug 2019 17:59:24 +0200 Subject: [PATCH] updates --- models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models.py b/models.py index 18bcb465..20ef978d 100755 --- a/models.py +++ b/models.py @@ -93,8 +93,8 @@ def create_modules(module_defs, img_size, arc): b = [7, -0.1] bias = module_list[-1][0].bias.view(len(mask), -1) # 255 to 3x85 - bias[:, 4] += b[0] # obj - bias[:, 5:] += b[1] # cls + bias[:, 4] += b[0] - bias[:, 4].mean() # obj + bias[:, 5:] += b[1] - bias[:, 5:].mean() # cls # bias = torch.load('weights/yolov3-spp.bias.pt')[yolo_index] # list of tensors [3x85, 3x85, 3x85] module_list[-1][0].bias = torch.nn.Parameter(bias.view(-1)) # utils.print_model_biases(model)