# helia_edge.models.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.

## helia_edge.models.miniresnet.build

`function` · `python`

```python
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**

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| params | MiniResNetV1Params | Required | Model parameters; ``num_classes`` is required. |
| input_shape | tuple[int \| None, ...] | Required | ``(height, width, channels)``; flatten pooling needs fixed spatial dimensions. |
| batch_size | int \| None | None | Static batch size; None for a dynamic batch. |
| name | str \| None | None | Model name; the family when None. |

**Returns**

| Name | Type | Description |
| --- | --- | --- |
|  | keras.Model | keras.Model: The model, named ``miniresnet`` unless ``name`` is given. |

Source: `helia_edge/models/miniresnet.py:36`
