@alie I am finding it difficult to understand the code because of its formatting, but I can see you’re applying softmax twice. You can either remove the line  my_outputs = softmax(outputs) or replace the 3rd line in CrossEntropyLoss() to outputs = torch.log(outputs).