The Tensor shape depends on the operation you would like to perform.
In a simple case we would like to create a linear model. The nn.Linear layer takes in_features as an input and outputs out_features.
Your tensor should have the dimensions [batch_size, in_features] to be fed to the model.
If you would like to use images for a CNN, your input tensors should be of dimension [batch_size, channel, height, width].
Do you have a specific issue or size mismatch problem or is it a general quastion?