Hi,
CrossEntropyLoss 3 expects your labels to be in range [0, C-1], where C denotes the number of classes - so in your case [0, 1] and not -1 or 1.
PS: If its a single-label binary classification, you can also have a look at BinaryCrossEntropy 21.
Greetings.