Solved by KFrank in post #3 
              
              
                Hi Richard! 

As Prashanth notes, you could use BCELoss in place of 
CrossEntropyLoss. 
However, you’ll be better off removing the torch.sigmoid() 
and using BCEWithLogitsLoss.  Doing so will be mathematically 
the same, but numerically more stable. 
Thus: 
class Classifier(nn.Module):
    def __ini…