Solved by ptrblck in post #2 
              
              
                Let’s first have a look at outputs[range(num_examples), labels]. 
As you said, outputs contains the model outputs and has the shape [batch_size, num_classes]. 
labels seems to be a torch.LongTensor, containing the ground truth class for each sample in the batch. 
In this code we are basically indexi…