Solved by SANTOSH_S in post #6 
              
              
                I found the error in your code.  
My bad the size of the labels should be [100]. 
Once you create the DataLoader creates [100,3,32,32] batch. Verify this with images.size() after the labels in above code. 
The input dimensions for the model be(since its fc)  [100,3x32x32]. 
So please make following …