Is it ok to use nn.CrossEntropyLoss() even for binary classification?

I tried using nn.CrossEntropyLoss() for binary classification and it didn’t work. You should use BCELoss.

2 Likes