Currently my setup is something like this:
class ConcatDataset(Dataset):
    '''Concatenates Datasets'''
    
    def __init__(self, *datasets):
        self.datasets = datasets

    def __getitem__(self, i):
        return tuple(d[i] for d in self.datasets)

    def __len__(self):
        return min(len(d) for d in self.datasets)

train_1_transforms = ...
train_2_transforms = ...
train_3_transforms = ...
train_4_transforms = ...
train_5_transforms = ...

train_1_data = ImageFolder(train_1_dir, transform=train_1_transforms)
train_2_data = ImageFolder(train_2_dir, transform=train_2_transforms)
train_3_data = ImageFolder(train_3_dir, transform=train_3_transforms)
train_4_data = ImageFolder(train_4_dir, transform=train_4_transforms)
train_5_data = ImageFolder(train_5_dir, transform=train_5_transforms)

train_concat_data = ConcatDataset(train_1_data, train_2_data, train_3_data, train_4_data, train_5_data)

train_loader = DataLoader(train_concat_data, batch_size=64, shuffle=True, pin_memory=True, num_workers=4)

I’m getting error:
RuntimeError: Found 0 files in subfolders of: ./data/train/class_1

I don’t have any idea how else to apply separate transformations to each class.