Hi,
If I’m not wrong BCE with logits used to have some assertion for the ground truth to be binary right?
Any reason why it’s been removed? (pytorch 1.2.0) It doesn’t even check if it’s bounded between 0-1
import torch

crit = torch.nn.BCEWithLogitsLoss()

pred = (torch.rand(10) - 0.5) * 10
gt = torch.randint_like(pred,0,2).float()
assert (pred > 1.).any()
assert (pred < 1.).any()

dif_predgt = crit(pred,gt)
dif_gtpred = crit(gt,pred)
print(dif_gtpred)
print(dif_predgt)