This commit is contained in:
Glenn Jocher 2019-08-29 17:59:24 +02:00
parent c344efc224
commit 894fc1c47f
1 changed files with 2 additions and 2 deletions

View File

@ -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)