I’d say your options are either:

Create a new dataset class that will load both A and B
or
Concatenate your datasets and make a data sampler class that will sequentially load from A and B.

Option 1 would be more hard-coded to your specific problem, and I think option 2 could give you more flexibility (or you could do some mixture of the above). Here’s a potential way you could do it:
class SequentialSamplerAugdata(torch.utils.data.Sampler):
    def __init__(self, data_source):
        self.data_source = data_source
        
    def __iter__(self):
        n = len(self.data_source) // 2
        seq_A = range(n)
        seq_B = (x + n for x in seq_A)
        return iter(itertools.chain(*zip(seq_A, seq_B)))

    def __len__(self):
        return len(self.data_source)

both_sets = torch.utils.data.ConcatDataset((data_A, data_B))
both_sets_loader = torch.utils.data.DataLoader(both_sets, 
                                               batch_size=2, 
                                               sampler=SequentialSamplerAugdata(both_sets), 
                                               shuffle=False)