Okay, I got your problem. Label is giving out the exact classes for each element in the mini batch.
Output consists of the probability over 10 classes for all minibatches. You can take an argmax over output to get the predicted class and then pass it into criterion.
You can make this change:
loss = criterion(label,torch.argmax(output,dim=1))