def __init__(self, image_dict_L, image_dict_U, opt):
        """
        Args:
            image_dict: two-level dict, `super_dict[super_class_id][class_id]` gives the list of
                        image paths having the same super-label and class label
        """
        self.image_dict_L = image_dict_L
        self.image_dict_U = image_dict_U
        self.dataset_name = opt.dataset
        self.batch_size = opt.bs
        self.samples_per_class = opt.samples_per_class
        for sub_L in self.image_dict_L:
            newsub_L = []
            for instance in self.image_dict_L[sub_L]:
                newsub_L.append((sub_L, instance))
            self.image_dict_L[sub_L] = newsub_L

        for sub_U in self.image_dict_U:
            newsub_U = []
            for instance in self.image_dict_U[sub_U]:
                newsub_U.append((sub_U, instance))
            self.image_dict_U[sub_U] = newsub_U

        # checks
        # provide avail_classes
        self.avail_classes = [*self.image_dict_L] + [*self.image_dict_U]
        # Data augmentation/processing methods.
        normalize = transforms.Normalize(
            mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]
        )
        transf_list = []

        transf_list.extend(
            [
                transforms.RandomResizedCrop(size=224)
                if opt.arch in ["resnet50", "resnet50_mcn"]
                else transforms.RandomResizedCrop(size=227),
                transforms.RandomHorizontalFlip(0.5),
            ]
        )
        transf_list.extend([transforms.ToTensor(), normalize])
        self.transform = transforms.Compose(transf_list)

        self.reshuffle()

        Args:
            image_dict: two-level dict, `super_dict[super_class_id][class_id]` gives the list of
                        image paths having the same super-label and class label
        
examples/pytorch/hilander/PSS/Smooth_AP/src/datasets.py