If I understand the code correctly, you are passing now tensors with a different shape to TensorDataset.
I would rather create a single target tensor and make sure the target and labels correspond to the input samples.
Shuffling will shuffle each tensor in the same way, so I assume you might see some issues if the shapes do not match. I’m not sure, if the smallest size will be used in this approach.