From 9dd1316a70dac982bd32d58b0d1a03e1b6d50b63 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Mon, 30 Dec 2019 15:41:47 -0800 Subject: [PATCH] updates --- utils/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/utils.py b/utils/utils.py index 6f1301aa..2c6be163 100755 --- a/utils/utils.py +++ b/utils/utils.py @@ -435,8 +435,9 @@ def compute_loss(p, targets, model): # predictions, targets, model lobj *= h['obj'] lcls *= h['cls'] if red == 'sum': + bs = tobj.shape[0] # batch size lbox *= 3 / ng - lobj *= 3 / np * 2 + lobj *= 3 / (6300 * bs) * 2 # 3 / np * 2 lcls *= 3 / ng / model.nc loss = lbox + lobj + lcls