Solved by ptrblck in post #8 
              
              
                If you want to keep F.log_softmax(x, dim=1), then yes. 
Otherwise use dim=2, if you want to permute the tensor afterwards. 

Yes, since it will be applied twice at the moment (in your forward and inside nn.CrossEntropyLoss).