Hi,
Did you check that target tensor (which should be class numbers, not one-hot vectors) is actually a torch.cuda.LongTensor?
If your class numbers happen to be in a FloatTensor, you can convert them to a LongTensor with labels.long() (likely preferably before wrapping them in a Variable.
Best regards
Thomas