Solved by SimonW in post #4 
              
              
                That is a lot of code. Try printing out the input to logsoftmax. 
Also, you might want to use better initialization on your weights and/or tune down the lr.