This commit is contained in:
Glenn Jocher 2019-08-25 03:03:35 +02:00
parent 5258ed8bdd
commit c4f9e3891e
1 changed files with 3 additions and 3 deletions

View File

@ -78,11 +78,11 @@ def create_modules(module_defs, img_size, arc):
# 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)
try: try:
if arc == 'default': if arc == 'default':
b = [-5, -4] # obj, cls b = [-4, -3.6] # obj, cls
elif arc == 'uCE': # unified CE (1 background + 80 classes) elif arc == 'uCE': # unified CE (1 background + 80 classes)
b = [7, 0] # obj, cls b = [10, -0.1] # obj, cls
elif arc == 'uBCE': # unified BCE (80 classes) elif arc == 'uBCE': # unified BCE (80 classes)
b = [0, -3.5] # obj, cls b = [0, -8.5] # obj, cls
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] += b[0] # obj bias[:, 4] += b[0] # obj