Skip to content
heliaEDGE
Reference
HELIA

miniresnet

MiniResNet-v1 for channels-last spectrogram patches.

Adapted from ST’s MiniResNet-v1 (services revision 0f6210ed5156126b782e1c43249063a477484b20). The default architecture matches its one-stack ESC-10 checkpoint with input (64, 50, 1) and ten classes. Constructors initialize weights; callers explicitly load trained weights using Keras, and own audio preprocessing, seeds, class labels and export policy.

Machine-readable model

  • buildfunctionConstruct an untrained MiniResNet-v1 classifier for NHWC spectrogram patches.
function

build

Python

Construct an untrained MiniResNet-v1 classifier for NHWC spectrogram patches.

helia_edge/models/miniresnet.py:36

build(
params: MiniResNetV1Params,
input_shape: tuple[int | None, ...],
*,
batch_size: int | None = None,
name: str | None = None,
) -> keras.Model

Construct an untrained MiniResNet-v1 classifier for NHWC spectrogram patches.

Hydration is explicit: model.load_weights(checkpoint_path). Only matching architecture, input dimensions and class count can reuse a checkpoint. This function does not read files or alter global settings.

Parameters of build
NameTypeDefaultDescription
paramsMiniResNetV1ParamsRequiredModel parameters; ``num_classes`` is required.
input_shapetuple[int | None, ...]Required``(height, width, channels)``; flatten pooling needs fixed spatial dimensions.
batch_sizeint | NoneNoneStatic batch size; None for a dynamic batch.
namestr | NoneNoneModel name; the family when None.
Returns of build
TypeDescription
keras.Modelkeras.Model: The model, named ``miniresnet`` unless ``name`` is given.