The data you pass into the model depends on the layers you are using.
In case you are using a linear layer, your data shape should be [batch_size, num_features].
nn.CrossEntropyLoss expects logits in the sshape of [batch_size, number_of_classes] and a target tensor of [batch_size] with class indices as its values.