Hi, you can use handle this problem in two ways,
One way is to get the model’s output of shape (16,1) , and use a nn.BCELoss().
Or get the model’s output to be shaped (16,2) and use nn.CrossEntropyLoss()
In your case, you have decided to have shape (16,2) , so you need to use nn.CrossEntropyLoss() instead of nn.BCELoss()