Solved by yash1994 in post #2 
              
              
                Hi, 
From your code, it seems like that you are passing actual prediction value (not logits) to the loss function. It depends on which loss function you are using, nn.CrossEntropyLoss and nn.BCEWithLogitsLoss comes with internal implementation of softmax (so you have to just pass the output of last …