We have also discussed the criterion in this thread 88, so maybe BCELoss was working better in this use case?
Could you clarify it @Leon_Lopez?
While you can use BCELoss for your use case (you won’t get a code error), I would still recommend to use nn.CrossEntropyLoss and apply the changes discussed in the other topic.