# Customizing my dataloader
class MyDataset():
    def __init__(self, cropped_1x32_dataset, targets):
        for i in range(32):
            self.__setattr__('data_{}'.format(i), cropped_1x32_dataset[i])
        self.targets = targets
        
    def __getitem__(self, index):
        for i in range(32):
            globals()['data_{}'.format(i)] = self.__getattribute__('data_{}'.format(i))[index]
        y = self.targets[index]
        return [globals()['data_{}'.format(i)] for i in range(32)], y
    
    def __len__(self):
        return len(self.data_0)

# train
my_train_dataset = MyDataset(train_cropped_1x32_dataset, train_dataset.targets)
my_train_loader = torch.utils.data.DataLoader(dataset = my_train_dataset,
                                              batch_size = batch_size,
                                              shuffle = True,
                                              num_workers=4)

# main
def train(epoch):
    model.train()
    train_loss = 0
    total = 0
    correct = 0
    
    for batch_idx, (cropped_1x32_dataset, target) in enumerate(my_train_loader):
        for i in range(32):   
            cropped_1x32_dataset[i] = cropped_1x32_dataset[i].to(device)
        target = target.to(device)

        optimizer.zero_grad()
        output = model(cropped_1x32_dataset)
        loss = criterion(output, target)
        loss.backward()
        optimizer.step()

In main, I checked the data.
But it doesn’t applied any transforms both RandomHorizontalFlip and Normalize.
How can I fix this?
Thank you.