bacpipe.model_pipelines.feature_extractors.audiomae

Functions

to_2tuple(x)

trunc_normal_(tensor[, mean, std, a, b])

Fills the input Tensor with values drawn from a truncated normal distribution.

Classes

AudiosetDataset(sr, audio_conf[, use_fbank, ...])

Model(**kwargs)

ModelBaseClass(sr, segment_length, model_name)

PatchEmbed_new([img_size, patch_size, ...])

Flexible Image to Patch Embedding

tqdm(*_, **__)

Decorate an iterable object, returning an iterator which acts exactly like the original iterable, but prints a dynamically updating progressbar every time a value is requested.

class bacpipe.model_pipelines.feature_extractors.audiomae.Model(**kwargs)[source]

Bases: ModelBaseClass

preprocess(audio)[source]
class bacpipe.model_pipelines.feature_extractors.audiomae.PatchEmbed_new(img_size=224, patch_size=16, in_chans=3, embed_dim=768, stride=10)[source]

Bases: Module

Flexible Image to Patch Embedding

forward(x)[source]

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

get_output_shape(img_size)[source]