This commit is contained in:
Glenn Jocher 2020-03-09 18:22:42 -07:00
parent 207cf14df4
commit 25ad727a3d
1 changed files with 1 additions and 2 deletions

View File

@ -95,8 +95,7 @@ def create_modules(module_defs, img_size, arc):
bias = module_list[-1][0].bias.view(len(mask), -1) # 255 to 3x85
bias[:, 4] += bo - bias[:, 4].mean() # obj
bias[:, 5:] += bc - bias[:, 5:].mean() # cls
module_list[-1][0].bias = torch.nn.Parameter(bias.view(-1)) # utils.print_model_biases(model)
bias[:, 5:] += bc - bias[:, 5:].mean() # cls, view with utils.print_model_biases(model)
except:
print('WARNING: smart bias initialization failure.')