(self)
return splits
Create splits for DTD and store them in the default path.

    If no split file is provided, and the default location for DTD splits
    does not contain a split file, splits are randomly created in this
    function using 70%, 15%, and 15% of the data for training, validation and
    testing, respectively, and then stored in that default location.

    Returns:
      The splits for this dataset, represented as a dictionary mapping each of
      'train', 'valid', and 'test' to a list of strings (class names).
Create splits for DTD and store them in the default path.
Create splits for DTD and store them in the default path .
def create_splits(self):
    """Create splits for DTD and store them in the default path.

    If no split file is provided, and the default location for DTD splits
    does not contain a split file, splits are randomly created in this
    function using 70%, 15%, and 15% of the data for training, validation and
    testing, respectively, and then stored in that default location.

    Returns:
      The splits for this dataset, represented as a dictionary mapping each of
      'train', 'valid', and 'test' to a list of strings (class names).
    """
    train_inds, valid_inds, test_inds = gen_rand_split_inds(
        self.NUM_TRAIN_CLASSES, self.NUM_VALID_CLASSES, self.NUM_TEST_CLASSES)
    class_names = sorted(
        tf.io.gfile.listdir(os.path.join(self.data_root, 'images')))
    splits = {
        'train': [class_names[i] for i in train_inds],
        'valid': [class_names[i] for i in valid_inds],
        'test': [class_names[i] for i in test_inds]
    }
    return splits
def create_splits ( self ) : train_inds , valid_inds , test_inds = gen_rand_split_inds ( self . NUM_TRAIN_CLASSES , self . NUM_VALID_CLASSES , self . NUM_TEST_CLASSES ) class_names = sorted ( tf . io . gfile . listdir ( os . path . join ( self . data_root , 'images' ) ) ) splits = { 'train' : [ class_names [ i ] for i in train_inds ] , 'valid' : [ class_names [ i ] for i in valid_inds ] , 'test' : [ class_names [ i ] for i in test_inds ] } return splits