mhusseinsh:

for me to have b


I guess the easiest way to do it is by using class torch.utils.data. SubsetRandomSampler ( indices ) 23
You just need to input the indices for the sample pairs, whether they are in the same Dataloader or even two or more Dataloaders, and off you go.
Still, you will have to build the Dataloader if you do not have it.