(self)
Sets self.dataset_spec to an initial BiLevelDatasetSpecification.
Sets self.dataset_spec to an initial BiLevelDatasetSpecification.
Sets self . dataset_spec to an initial BiLevelDatasetSpecification .
def _init_bilevel_data_specification(self):
    """Sets self.dataset_spec to an initial BiLevelDatasetSpecification."""
    # Maps each Split to the number of superclasses assigned to it.
    self.superclasses_per_split = {
        learning_spec.Split.TRAIN: 0,
        learning_spec.Split.VALID: 0,
        learning_spec.Split.TEST: 0
    }

    # Maps each superclass id to the number of classes it contains.
    self.classes_per_superclass = collections.defaultdict(int)

    # Maps each superclass id to the name of its class.
    self.superclass_names = {}

    self._create_data_spec()
def _init_bilevel_data_specification ( self ) : # Maps each Split to the number of superclasses assigned to it. self . superclasses_per_split = { learning_spec . Split . TRAIN : 0 , learning_spec . Split . VALID : 0 , learning_spec . Split . TEST : 0 } # Maps each superclass id to the number of classes it contains. self . classes_per_superclass = collections . defaultdict ( int ) # Maps each superclass id to the name of its class. self . superclass_names = { } self . _create_data_spec ( )