def __init__(self, root, subset, classes=CLASSES, silence_percentage=0.1):
    """
    :param root: Dataset root directory
    :param subset: Which dataset subset to use ("train", "test", "valid", "noise")
    :param classes: List of classes to load. See CLASSES for valid options
    :param silence_percentage: Percentage of the dataset to be filled with silence
    """
    self.classes = classes

    self._root = root
    self._subset = subset
    self._silence_percentage = silence_percentage

    self.data = None

    # Circular list of all epochs in this dataset
    epochs = sorted([int(e) for e in os.listdir(root) if e.isdigit()])
    self._all_epochs = itertools.cycle(epochs)

    # load first epoch
    self.next_epoch()
def __init__ ( self , root , subset , classes = CLASSES , silence_percentage = 0.1 ) : self . classes = classes self . _root = root self . _subset = subset self . _silence_percentage = silence_percentage self . data = None epochs = sorted ( [ int ( e ) for e in os . listdir ( root ) if e . isdigit ( ) ] ) self . _all_epochs = itertools . cycle ( epochs ) self . next_epoch ( )
:param root: Dataset root directory
    :param subset: Which dataset subset to use ("train", "test", "valid", "noise")
    :param classes: List of classes to load. See CLASSES for valid options
    :param silence_percentage: Percentage of the dataset to be filled with silence