This commit is contained in:
Glenn Jocher 2019-04-15 13:58:48 +02:00
parent 76bf9fceed
commit 00cc02ba91
1 changed files with 1 additions and 1 deletions

View File

@ -265,7 +265,7 @@ def compute_loss(p, targets): # predictions, targets
lxy += (k * 8) * MSE(torch.sigmoid(pi[..., 0:2]), txy[i]) # xy loss lxy += (k * 8) * MSE(torch.sigmoid(pi[..., 0:2]), txy[i]) # xy loss
lwh += (k * 1) * MSE(pi[..., 2:4], twh[i]) # wh yolo loss lwh += (k * 1) * MSE(pi[..., 2:4], twh[i]) # wh yolo loss
# lwh += (k * 4) * MSE(torch.sigmoid(pi[..., 2:4]), twh[i]) # wh power loss # lwh += (k * 1) * MSE(torch.sigmoid(pi[..., 2:4]), twh[i]) # wh power loss
lcls += (k * 1) * CE(pi[..., 5:], tcls[i]) # class_conf loss lcls += (k * 1) * CE(pi[..., 5:], tcls[i]) # class_conf loss
# pos_weight = FT([gp[i] / min(gp) * 4.]) # pos_weight = FT([gp[i] / min(gp) * 4.])