The shape of the target depends on your use case.
TensorDataset will take whatever tensors you pass to it.
However, if you are dealing with a multi-class classification (and use e.g. nn.CrossEntropyLoss), your targets should be LongTensors containing the class indices.
For a model output of [batch_size, nb_classes], your targets would be [batch_size] with values in [0, nb_classes-1].