ertk.preprocessing.keras_apps.KerasAppsExtractorConfig

class ertk.preprocessing.keras_apps.KerasAppsExtractorConfig(model: str = '???', size: int | None = None, n_mels: int = 128, spec_type: str = 'mel', fmax: int = 8000)

Bases: ERTKConfig

Configuration for KerasAppsExtractor.

__init__(model: str = '???', size: int | None = None, n_mels: int = 128, spec_type: str = 'mel', fmax: int = 8000) None

Methods

__init__([model, size, n_mels, spec_type, fmax])

Inherited Methods

default()

Create default config.

from_config(config)

Create config object from any compatible config.

from_file(path)

Create config from YAML file and optionlly override some values.

merge_with_args(args)

Merge config with command-line arguments.

merge_with_config(config)

Merge other config into this config.

to_dictconfig()

Convert config to DictConfig.

to_file(path)

Write config to YAML file.

to_string()

Generate YAML string representation of config.

Attributes

fmax

Maximum frequency for spectrogram extraction.

model

Name of the model to use.

n_mels

Number of mel bands for spectrogram extraction.

size

Size of the input image.

spec_type

type of spectrogram to extract.

fmax: int = 8000

Maximum frequency for spectrogram extraction.

model: str = '???'

Name of the model to use. See https://keras.io/api/applications/ for the list of available models.

n_mels: int = 128

Number of mel bands for spectrogram extraction.

size: int | None = None

Size of the input image. If not specified, the default size of the model will be used.

spec_type: str = 'mel'

type of spectrogram to extract. Can be either ‘mel’ or ‘linear’.