Solved by phan_phan in post #5 
              
              
                Because calling nn.BCEWithLogitsLoss is the equivalent of calling first nn.Sigmoid, and then nn.BCELoss. 
It’s just that those two are often called one after the other, so they designed nn.BCEWithLogitsLoss that does both, and better. 
To cite the docs : 
This loss combines a Sigmoid layer and the B…