def __len__(self):
    'Return the total number of images in the dataset.\n\n        As we have two datasets with potentially different number of images,\n        we take a maximum of\n        '
    return max(self.A_size, self.B_size)
Return the total number of images in the dataset.

As we have two datasets with potentially different number of images,
we take a maximum of
def __len__(self):
    'Return the total number of images in the dataset.\n\n        As we have two datasets with potentially different number of images,\n        we take a maximum of\n        '
    return max(self.A_size, self.B_size)