Sure, the model in the tutorial outputs 10 logits in its last linear layer. As you can see, no non-linearity was used on this layer, so that the values represent the raw logits for all 10 classes.
If you call softmax on them, you would get the probabilities for each class, but we don’t want to do that now.
Our label tensor contains just the current class index for each sample.
So, if your current sample belongs to class2, we just use the index 2 in the label instead of a representation like [0, 0, 1, 0, 0, 0, 0, 0, 0, 0].
The shape of your model output should be [batch_size, number_of_classes], while label should be [batch_size].
Here is a small example just showing how to use the criterion:
batch_size = 5
nb_classes = 10
model = nn.Linear(20, nb_classes)

x = torch.randn(batch_size, 20)
target = torch.empty(batch_size, dtype=torch.long).random_(nb_classes)

criterion = nn.CrossEntropyLoss()

output = model(x)
loss = criterion(output, target)