Solved by ptrblck in post #2 
              
              
                Could you explain the shape of your target a bit? 
Based on your model definition it looks like you are dealing with a multi-class classification, where you try to classify one out of four possible classes for each sample. 
If so, the target should be a LongTensor with the shape [batch_size] contain…