ptrblck:

For a binary classification you could use nn.CrossEntropyLoss() with a logit output of shape [batch_size, 2] or nn.BCELoss() with a nn.Sigmoid() in the last layer.


When you said binary classification you mean here just two categories, (like spam or not spam) Right?