Yes, nn.CrossEntropyLoss expects the target to be a LongTensor containing the class indices in the range [0, nb_classes-1].
If your current labels are stored as string, you might want to use a dict and map these strings to the corresponding indices.