(self, split)
return offset
Returns the starting class id of the contiguous chunk of ids of split.

    Args:
      split: A Split, the split for which to get classes.

    Raises:
      ValueError: Invalid dataset split.
Returns the starting class id of the contiguous chunk of ids of split.
Returns the starting class id of the contiguous chunk of ids of split .
def _get_split_offset(self, split):
    """Returns the starting class id of the contiguous chunk of ids of split.

    Args:
      split: A Split, the split for which to get classes.

    Raises:
      ValueError: Invalid dataset split.
    """
    if split == learning_spec.Split.TRAIN:
      offset = 0
    elif split == learning_spec.Split.VALID:
      previous_superclasses = range(
          0, self.superclasses_per_split[learning_spec.Split.TRAIN])
      offset = self._count_classes_in_superclasses(previous_superclasses)
    elif split == learning_spec.Split.TEST:
      previous_superclasses = range(
          0, self.superclasses_per_split[learning_spec.Split.TRAIN] +
          self.superclasses_per_split[learning_spec.Split.VALID])
      offset = self._count_classes_in_superclasses(previous_superclasses)
    else:
      raise ValueError('Invalid dataset split.')
    return offset
def _get_split_offset ( self , split ) : if split == learning_spec . Split . TRAIN : offset = 0 elif split == learning_spec . Split . VALID : previous_superclasses = range ( 0 , self . superclasses_per_split [ learning_spec . Split . TRAIN ] ) offset = self . _count_classes_in_superclasses ( previous_superclasses ) elif split == learning_spec . Split . TEST : previous_superclasses = range ( 0 , self . superclasses_per_split [ learning_spec . Split . TRAIN ] + self . superclasses_per_split [ learning_spec . Split . VALID ] ) offset = self . _count_classes_in_superclasses ( previous_superclasses ) else : raise ValueError ( 'Invalid dataset split.' ) return offset