I try to predict some masks using BCELoss. Something is like below:
loss = F.binary_cross_entropy(predicts, targets, reduction='elementwise_mean')

But loss is always above 0.5, then I try to use two identical masks to check BCELoss:
loss = F.binary_cross_entropy(same_mask, same_mask, reduction='elementwise_mean')

Then I got this: tensor(0.4984), which I think it should be zero.
I deal with this problem for a while and still don’t know how to solve.
Is there any suggest? That will be really helpful.
For some details, masks’ shape are like (28, 28) or (14,14), and have gone through sigmoid function.