Solved by ptrblck in post #2 
              
              
                You are saturating the sigmoid with such a high number. 
Have a look at this small test: 
labels = torch.zeros([1])

for x in torch.linspace(10, 100):
    print((torch.sigmoid(x) - 1.) == 0, ' for ', x)
    x = x.view(1)
    ce = F.binary_cross_entropy(torch.sigmoid(x), labels)
    ce_logit = F.bina…