I have no idea as I have no acess to your dataset
I would iterate over the dataset asserting the size
dataset = torch.utils.data.TensorDataset(x_train, y_train)
loader = DataLoader(
    dataset=dataset,
    batch_size = 32,
    shuffle=True,
    num_workers=0,
    pin_memory=torch.cuda.is_available()
)
for sample in loader:
    assert sample.shape == expected

But for sure you have some sneaky line somewhere you forgot.