def __init__(self, opt):
    'Initialize this dataset class.\n\n        Parameters:\n            opt (Option class) -- stores all the experiment flags; needs to be a subclass of BaseOptions\n        '
    BaseDataset.__init__(self, opt)
    self.dir_A = os.path.join(opt.dataroot, (opt.phase + 'A'))
    self.dir_B = os.path.join(opt.dataroot_B, (opt.phase + 'B'))
    self.A_paths = sorted(make_dataset(self.dir_A, opt.max_dataset_size))
    self.B_paths = sorted(make_dataset(self.dir_B, opt.max_dataset_size))
    self.A_size = len(self.A_paths)
    self.B_size = len(self.B_paths)
    btoA = (self.opt.direction == 'BtoA')
    input_nc = (self.opt.output_nc if btoA else self.opt.input_nc)
    output_nc = (self.opt.input_nc if btoA else self.opt.output_nc)
    self.transform_A = get_transform(self.opt, grayscale=(input_nc == 1))
    self.transform_B = get_transform(self.opt, grayscale=(output_nc == 1))
Initialize this dataset class.

Parameters:
    opt (Option class) -- stores all the experiment flags; needs to be a subclass of BaseOptions
def __init__(self, opt):
    'Initialize this dataset class.\n\n        Parameters:\n            opt (Option class) -- stores all the experiment flags; needs to be a subclass of BaseOptions\n        '
    BaseDataset.__init__(self, opt)
    self.dir_A = os.path.join(opt.dataroot, (opt.phase + 'A'))
    self.dir_B = os.path.join(opt.dataroot_B, (opt.phase + 'B'))
    self.A_paths = sorted(make_dataset(self.dir_A, opt.max_dataset_size))
    self.B_paths = sorted(make_dataset(self.dir_B, opt.max_dataset_size))
    self.A_size = len(self.A_paths)
    self.B_size = len(self.B_paths)
    btoA = (self.opt.direction == 'BtoA')
    input_nc = (self.opt.output_nc if btoA else self.opt.input_nc)
    output_nc = (self.opt.input_nc if btoA else self.opt.output_nc)
    self.transform_A = get_transform(self.opt, grayscale=(input_nc == 1))
    self.transform_B = get_transform(self.opt, grayscale=(output_nc == 1))