Assuming you are passing train_transform to the transform argument in DatasetLoader_Custom, you would have to apply this transformation for each image separately as noted by @planet_pluto.
Currently you are passing the sample dict  to self.transform so use self.transform(sample['image']) instead.