def _info(self):
    features = {'id': tf.string, 'audio': tfds.features.Tensor(shape=((_AUDIO_RATE * _NUM_SECS),), dtype=tf.float32), 'pitch': tfds.features.ClassLabel(num_classes=128), 'velocity': tfds.features.ClassLabel(num_classes=128), 'instrument': {'label': tfds.features.ClassLabel(num_classes=1006), 'family': tfds.features.ClassLabel(names=_INSTRUMENT_FAMILIES), 'source': tfds.features.ClassLabel(names=_INSTRUMENT_SOURCES)}, 'qualities': {quality: tf.bool for quality in _QUALITIES}}
    if self.builder_config.estimate_f0_and_loudness:
        f0_and_ld_shape = (((_F0_AND_LOUDNESS_RATE * _NUM_SECS) + 1),)
        features['f0'] = {'hz': tfds.features.Tensor(shape=f0_and_ld_shape, dtype=tf.float32), 'midi': tfds.features.Tensor(shape=f0_and_ld_shape, dtype=tf.float32), 'confidence': tfds.features.Tensor(shape=f0_and_ld_shape, dtype=tf.float32)}
        features['loudness'] = {'db': tfds.features.Tensor(shape=f0_and_ld_shape, dtype=tf.float32)}
    return tfds.core.DatasetInfo(builder=self, description=_DESCRIPTION, features=tfds.features.FeaturesDict(features), homepage='https://g.co/magenta/nsynth-dataset', citation=_CITATION, metadata=tfds.core.BeamMetadataDict())
def _info(self):
    features = {'id': tf.string, 'audio': tfds.features.Tensor(shape=((_AUDIO_RATE * _NUM_SECS),), dtype=tf.float32), 'pitch': tfds.features.ClassLabel(num_classes=128), 'velocity': tfds.features.ClassLabel(num_classes=128), 'instrument': {'label': tfds.features.ClassLabel(num_classes=1006), 'family': tfds.features.ClassLabel(names=_INSTRUMENT_FAMILIES), 'source': tfds.features.ClassLabel(names=_INSTRUMENT_SOURCES)}, 'qualities': {quality: tf.bool for quality in _QUALITIES}}
    if self.builder_config.estimate_f0_and_loudness:
        f0_and_ld_shape = (((_F0_AND_LOUDNESS_RATE * _NUM_SECS) + 1),)
        features['f0'] = {'hz': tfds.features.Tensor(shape=f0_and_ld_shape, dtype=tf.float32), 'midi': tfds.features.Tensor(shape=f0_and_ld_shape, dtype=tf.float32), 'confidence': tfds.features.Tensor(shape=f0_and_ld_shape, dtype=tf.float32)}
        features['loudness'] = {'db': tfds.features.Tensor(shape=f0_and_ld_shape, dtype=tf.float32)}
    return tfds.core.DatasetInfo(builder=self, description=_DESCRIPTION, features=tfds.features.FeaturesDict(features), homepage='https://g.co/magenta/nsynth-dataset', citation=_CITATION, metadata=tfds.core.BeamMetadataDict())