It just means that you are feeding the wrong format. The cross entropy loss function you are using should receive a matrix containing the logits with dimensions: num_examples x num_classes. I.e., these are one-hot encoded. The targets, however, are a 1D long-type array with dimension “num_examples” only.  (currently you have 2D long vs 2D long but with num_examples x 1 dimensions, which is why you get the error “implemented for type torch.cuda.LongTensor’”).
I have a step by step example notebook here if that helps with understanding the expected format: https://github.com/rasbt/stat479-deep-learning-ss19/blob/master/L08_logistic/code/cross-entropy-pytorch.ipynb 221