It depends what your task is.
Pytorch always assumeses that the first dimension is the batch dimension.
If you do regression, then X_train and y_train should have exactly the same size.
If you are doing classification, y_train will be a 1D tensor of size X_train.size(0) (the batch size).