(self)
Reads the splits for the dataset from self.split_file.

    This will not always be used (as we noted earlier there are datasets that
    define the splits in other ways, e.g. via structure of their directories).

    Returns:
      A splits dictionary mapping each split to a list of class names belonging
      to it, or False upon failure (e.g. the splits do not exist).
Reads the splits for the dataset from self.split_file.
Reads the splits for the dataset from self . split_file .
def read_splits(self):
    """Reads the splits for the dataset from self.split_file.

    This will not always be used (as we noted earlier there are datasets that
    define the splits in other ways, e.g. via structure of their directories).

    Returns:
      A splits dictionary mapping each split to a list of class names belonging
      to it, or False upon failure (e.g. the splits do not exist).
    """
    logging.info('Attempting to read splits from %s...', self.split_file)
    if tf.io.gfile.exists(self.split_file):
      with tf.io.gfile.GFile(self.split_file, 'r') as f:
        try:
          splits = json.load(f)
        except json.decoder.JSONDecodeError:
          logging.info('Unsuccessful: file exists, but loading failed. %s',
                       traceback.format_exc())
          return False
        logging.info('Successful.')
        return splits
    else:
      logging.info('Unsuccessful.')
      return False
def read_splits ( self ) : logging . info ( 'Attempting to read splits from %s...' , self . split_file ) if tf . io . gfile . exists ( self . split_file ) : with tf . io . gfile . GFile ( self . split_file , 'r' ) as f : try : splits = json . load ( f ) except json . decoder . JSONDecodeError : logging . info ( 'Unsuccessful: file exists, but loading failed. %s' , traceback . format_exc ( ) ) return False logging . info ( 'Successful.' ) return splits else : logging . info ( 'Unsuccessful.' ) return False