(self)
Returns an initial DatasetSpecification or BiLevelDatasetSpecification.

    Creates this instance using initial values that need to be overwritten in
    every sub-class implementing the converter for a different dataset. In
    particular, in the case of a DatasetSpecification, each sub-class must
    overwrite the 3 following fields accordingly: classes_per_split,
    images_per_class, and class_names. In the case of its bi-level counterpart,
    each sub-class must overwrite: superclasses_per_split,
    classes_per_superclass, images_per_class, superclass_names, and class_names.
    In both cases, this happens in create_dataset_specification_and_records().
    Note that if other, non-mutable fields are updated, or if these objects are
    replaced with other ones, see self._create_data_spec() to create a new spec.
Returns an initial DatasetSpecification or BiLevelDatasetSpecification.
Returns an initial DatasetSpecification or BiLevelDatasetSpecification .
def _init_specification(self):
    """Returns an initial DatasetSpecification or BiLevelDatasetSpecification.

    Creates this instance using initial values that need to be overwritten in
    every sub-class implementing the converter for a different dataset. In
    particular, in the case of a DatasetSpecification, each sub-class must
    overwrite the 3 following fields accordingly: classes_per_split,
    images_per_class, and class_names. In the case of its bi-level counterpart,
    each sub-class must overwrite: superclasses_per_split,
    classes_per_superclass, images_per_class, superclass_names, and class_names.
    In both cases, this happens in create_dataset_specification_and_records().
    Note that if other, non-mutable fields are updated, or if these objects are
    replaced with other ones, see self._create_data_spec() to create a new spec.
    """
    # First initialize the fields that are common to both types of data specs.
    # Maps each class id to its number of images.
    self.images_per_class = collections.defaultdict(int)

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

    # Pattern that each class' filenames should adhere to.
    self.file_pattern = DEFAULT_FILE_PATTERN

    if self.has_superclasses:
      self._init_bilevel_data_specification()
    else:
      self._init_data_specification()
def _init_specification ( self ) : # First initialize the fields that are common to both types of data specs. # Maps each class id to its number of images. self . images_per_class = collections . defaultdict ( int ) # Maps each class id to the name of its class. self . class_names = { } # Pattern that each class' filenames should adhere to. self . file_pattern = DEFAULT_FILE_PATTERN if self . has_superclasses : self . _init_bilevel_data_specification ( ) else : self . _init_data_specification ( )