If I properly understood, you replaced CIFAR10 dataset by your own by loading them from CIFAR10 dataset right?
The point is that you are getting the data somehow from the dataset directory rather than iterating the dataset. My guess is that CIFAR10 call function is never run, consequently, transforms are never applied.
If you want to precompute transforms I would recommend to iterate over dataset instead of getting data like this train_dataset.data[i]
If you want to apply transforms on-the-fly you should apply them here
    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