How to merge two torch.utils.data dataloaders with a single operation

No, there is no simple way to do that. You can start sampling from val_loader after getting all samples from train_loader