From 2e88a5663555eb3e75d7bf49cef898b9aa9db743 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Wed, 4 Mar 2020 14:02:42 -0800 Subject: [PATCH] updates --- models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/models.py b/models.py index 2034169b..32f5176b 100755 --- a/models.py +++ b/models.py @@ -87,8 +87,9 @@ def create_modules(module_defs, img_size, arc): # Initialize preceding Conv2d() bias (https://arxiv.org/pdf/1708.02002.pdf section 3.3) try: + p = math.log(1 / (modules.nc - 1)) # class probability -> sigmoid(p) = 1/nc if arc == 'default' or arc == 'Fdefault': # default - b = [-3.0, -6.0] # obj, cls + b = [-5.0, p] # obj, cls elif arc == 'uBCE': # unified BCE (80 classes) b = [0, -9.0] elif arc == 'uCE': # unified CE (1 background + 80 classes)