You could pass the input tensor directly with the target tensor to a TensorDataset and pass it to a DataLoader without splitting:
x = torch.randn(64, 256, 16, 16)
y = torch.randint(0, 10, (64,))
dataset = TensorDataset(x, y)
loader = DataLoader(
    dataset,
    batch_size=2,
    num_workers=2,
    shuffle=True
)