# helia_edge.layers.mbconv

## MBConv Layer API

This module provides classes to build mobile inverted bottleneck convolutional layers.

**Classes**

| Name | Description |
| --- | --- |
| `MBConvParams` | MBConv parameters |

**Functions**

| Name | Description |
| --- | --- |
| `mbconv_block` | MBConv block w/ expansion and SE |

## helia_edge.layers.mbconv.mbconv_block

`function` · `python`

```python
mbconv_block(
    output_filters: int,
    expand_ratio: float = 1,
    kernel_size: int | tuple[int, int] = 3,
    strides: int | tuple[int, int] = 1,
    se_ratio: float = 8,
    droprate: float = 0,
    bn_momentum: float = 0.9,
    activation: str | Callable = 'relu6',
    name: str | None = None,
) -> keras.Layer
```

MBConv block w/ expansion and SE

This layer can support 1D inputs by providing a dummy dimension.
In such cases, the kernel_size and strides should be adjusted accordingly.

**Parameters**

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| output_filters | int | Required | Number of output filter channels |
| expand_ratio | float | 1 | Expansion ratio. Defaults to 1. |
| kernel_size | int \| tuple[int, int] | 3 | Kernel size. Defaults to 3. |
| strides | int \| tuple[int, int] | 1 | Stride length. Defaults to 1. |
| se_ratio | float | 8 | SE ratio. Defaults to 8. |
| droprate | float | 0 | Drop rate. Defaults to 0. |
| bn_momentum | float | 0.9 | Batch normalization momentum. Defaults to 0.9. |
| activation | str | 'relu6' | Activation function. Defaults to "relu6". |
| name | str \| None | None | Block name. Defaults to None. |

**Returns**

| Name | Type | Description |
| --- | --- | --- |
|  | keras.Layer | keras.Layer: Functional layer |

Source: `helia_edge/layers/mbconv.py:25`
