This commit is contained in:
Glenn Jocher 2019-08-19 18:03:33 +02:00
parent d73ad897a4
commit 44ea6984f9
1 changed files with 2 additions and 2 deletions

View File

@ -77,8 +77,8 @@ def create_modules(module_defs, img_size):
# Initialize preceding Conv2d() bias (https://arxiv.org/pdf/1708.02002.pdf section 3.3) # Initialize preceding Conv2d() bias (https://arxiv.org/pdf/1708.02002.pdf section 3.3)
bias = module_list[-1][0].bias.view(len(mask), -1) # 255 to 3x85 bias = module_list[-1][0].bias.view(len(mask), -1) # 255 to 3x85
bias[:, 4] -= 3.0 # obj bias[:, 4] -= 5.0 # obj
bias[:, 5:] -= 0.3 # cls bias[:, 5:] -= 4.0 # cls
module_list[-1][0].bias = torch.nn.Parameter(bias.view(-1)) module_list[-1][0].bias = torch.nn.Parameter(bias.view(-1))
# for l in model.yolo_layers: # print pretrained biases # for l in model.yolo_layers: # print pretrained biases