I cannot reproduce the issue using:
X_train = torch.randn(3441, 7, 1, 128, 128)
y_train = torch.randint(0, 10, (3441,))

dataset = Dataset(X_train, y_train)
loader = DataLoader(dataset, batch_size=16)

for data, target in loader:
    print(data.shape)
    print(target.shape)

Could you compare my code snippet to yours and check, what the difference might be?