This unpacking should work:
class Siamese(Dataset):
    def __init__(self):
        self.data0 = torch.randn(10, 3, 224, 224)
        self.target0 = torch.randint(0, 10, (10,))
        self.data1 = torch.randn(10, 3, 224, 224)
        self.target1 = torch.randint(0, 10, (10,))

    def __getitem__(self, index):
        img_0 = self.data0[index]
        label_0 = self.target0[index]
        img_1 = self.data1[index]
        label_1 = self.target1[index]
        return (img_0, label_0), (img_1, label_1)

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

dataset = Siamese()
loader = DataLoader(dataset, batch_size=2)

for idx, (batch0, batch1) in enumerate(loader):
    data0, target0 = batch0
    data1, target1 = batch1
    print(data0.shape, target0.shape)
    print(data1.shape, target1.shape)