Ok one problem is that you apply a softmax function to the output of the network but crossentropy loss also applies a softmax. Try deleting the softmax function on your output and see if that helps. You can also just move it to after your loss so you can use it for the predictions. You also don’t need to put your loss function on a device.