Create multiple training dataloaders while one batch from the same dataloader

Hi, everyone!

Supposed I have three kinds of datasets, I want to use all of them for the model training.

Now I hope that for a given batch, its data should be from the same dataset. But different batches can be randomly from different datasets.

For example, the first batch is from dataset A and the second batch is from dataset B, and so on.

Does anyone have some ideas to implement it?

Thanks for your time!

1 Like