Open wangxiaodong1021 opened 5 years ago
The elements in neg_weights
are not always 1s. Weights at the locations close to the corners are less than 1, while the rest are 1s. There are usually only a few objects in an image so most of the elements in neg_weights
would be 1s. When you print neg_weights
, PyTorch only shows a small part of it and those elements are very likely to be 1s.
Hello, I have some confusion about the loss function (_neg_loss).
I found the
neg_weights
is always 1. So,neg_loss = torch.log(1 - neg_pred) * torch.pow(neg_pred, 2) * neg_weights
equivalent toneg_loss = torch.log(1 - neg_pred) * torch.pow(neg_pred, 2)
.Is my understanding correct?