From 11aac8930be16f4addb9f99b22c2702f3f9bd59a Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Thu, 22 Aug 2019 15:48:06 +0200 Subject: [PATCH] updates --- models.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/models.py b/models.py index 804d3a4a..5b8a5207 100755 --- a/models.py +++ b/models.py @@ -81,9 +81,12 @@ def create_modules(module_defs, img_size): if arc == 'normal': bias[:, 4] -= 5.0 # obj bias[:, 5:] -= 4.0 # cls - elif arc == 'uCE': + elif arc == 'uCE': # unified CE (1 background + 80 classes) bias[:, 4] += 3.0 # obj bias[:, 5:] -= 4.0 # cls + elif arc == 'uBCE': # unified BCE (80 classes) + bias[:, 4] -= 5.0 # obj + bias[:, 5:] -= 4.0 # cls module_list[-1][0].bias = torch.nn.Parameter(bias.view(-1)) # for l in model.yolo_layers: # print pretrained biases