I have two datasets say,
MySecondDataset = MySecondDatasetClass(data2)
I have written a sampler which interleaves the sampling from two datasets which take input the concatenated dataset
concat_dataset = ConcatDataset([MyFirstDataset,MySecondDataset])
and give me the interleaved schedule. But the problem is and I am loading a dataset using a single data loader
dataloader = DataLoader(dataset = concat_dataset, sampler = BatchSchedulerSampler(dataset = concat_dataset,batch_size = batch_size), batch_schedule = args.batch_schedule),batch_size = batch_size)
I want to apply separate collate_fn for the two datasets but the dataloader only allows one collate_fn(correct me if I am wrong), please let me know how apply separate collate_fn in the dataloader if the dataset consists of 2 or more datasets.