(self)
return dataset
Loads GANsynth subset of NSynth dataset from TFDS.
Loads GANsynth subset of NSynth dataset from TFDS.
Loads GANsynth subset of NSynth dataset from TFDS .
def _get_dataset_from_tfds(self):
    """Loads GANsynth subset of NSynth dataset from TFDS."""
    try:
      dataset = tfds.load(
          'nsynth/gansynth_subset:2.3.*',
          data_dir=self._config['tfds_data_dir'],
          split=tfds.Split.TRAIN,
          download=False)
    except AssertionError as e:
      tf.logging.warning(
          'To train with the NSynth dataset, you must either set the '
          '\tfds_data_dir\' hparam to \'gs://tfds-data/datasets\' (recommended '
          'if running on GCP) or to a local directory where the dataset has '
          'been downloaded. You can download the dataset with the command '
          '`python -m tensorflow_datasets.scripts.download_and_prepare '
          '--datasets=nsynth/gansynth_subset --data_dir=/path/to/local/dir`.')
      raise e
    dataset = dataset.shuffle(buffer_size=1000)
    dataset = dataset.repeat()
    return dataset
def _get_dataset_from_tfds ( self ) : try : dataset = tfds . load ( 'nsynth/gansynth_subset:2.3.*' , data_dir = self . _config [ 'tfds_data_dir' ] , split = tfds . Split . TRAIN , download = False ) except AssertionError as e : tf . logging . warning ( 'To train with the NSynth dataset, you must either set the ' '\tfds_data_dir\' hparam to \'gs://tfds-data/datasets\' (recommended ' 'if running on GCP) or to a local directory where the dataset has ' 'been downloaded. You can download the dataset with the command ' '`python -m tensorflow_datasets.scripts.download_and_prepare ' '--datasets=nsynth/gansynth_subset --data_dir=/path/to/local/dir`.' ) raise e dataset = dataset . shuffle ( buffer_size = 1000 ) dataset = dataset . repeat ( ) return dataset