Use array in DataLoader

Hi all,

i’m trying to load a 4 dimensional tensor (concatenated images) and the corresponding labels into a DataLoader object:

batch_tfms = T.Compose([Normalize()])
dl_train = DataLoader(list(zip(train, train_labels)), bs=128, device=‘cuda’, after_batch=batch_tfms)

However if I call the one_batch method, it seems that the Normalize() transformation has not been applied. Has anyone here an idea why this happens, or a hint, what could be another suitable way of loading an existing tensor and the corresonding labels into a DataLoader.

Thanks for your help, best regards
Nic