pytorch Dataloader transforms data automatically

I created a custom dataset(ds) with all the transforms to torch datatype for the images. I do not want to transform a list passed thru the dataset.
When I pass the dataset(ds) thru the data loader


for i, data in enumerate(traindata):

The list gets transformed.

Expected List


Got List

[1 [torchLongTensor of size 1]]

How can I prevent such transformation in the Dataloader?

I think this conversion happens at the Dataset level, not DataLoader. Can you show the code for your custom Daatset, specifically, the __getitem__ function?