{
  "$schema": "https://ambiqai.github.io/helia-ui/schema/reference-model-1.json",
  "generatedFrom": {
    "sourceCommit": "f341fb11f7f5d77a4974ba8273c4cd55d67c21f0",
    "tool": "pyref",
    "version": "1.7.3"
  },
  "language": "python",
  "modules": [
    {
      "description": "# U-NeXt\n\n## Overview\n\nU-NeXt is a modification of U-Net that utilizes techniques from ResNeXt and EfficientNetV2. During the encoding phase, mbconv blocks are used to efficiently process the input.\n\nParameters are in ``helia_edge.models.unext_params``.\n\n**Functions**\n\n| Name | Description |\n| --- | --- |\n| `build` | U-NeXt model from ``UNextParams`` |\n| `unext_block` | Create U-NeXt block |\n| `se_block` | Squeeze and excite block |\n| `norm_layer` | Normalization layer |\n| `unext_core` | Create U-NeXt core |\n| `unext_layer` | Create U-NeXt layer |\n\n## Additions\n\nThe U-NeXt architecture has been modified to allow the following:\n\n* MBConv blocks used in the encoding phase.\n* Squeeze and excitation (SE) blocks added within blocks.",
      "name": "unext",
      "path": "helia_edge.models.unext",
      "submodules": [],
      "summary": "U-NeXt",
      "symbols": [
        {
          "description": "Squeeze and excite block",
          "examples": [],
          "id": "helia_edge.models.unext.se_block",
          "kind": "function",
          "language": "python",
          "members": [],
          "name": "se_block",
          "params": [],
          "raises": [],
          "returns": [],
          "signature": "se_block(ratio: int = 8, name: str | None = None)",
          "source": {
            "line": 35,
            "path": "helia_edge/models/unext.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/models/unext.py#L35"
          },
          "summary": "Squeeze and excite block"
        },
        {
          "description": "Normalization layer",
          "examples": [],
          "id": "helia_edge.models.unext.norm_layer",
          "kind": "function",
          "language": "python",
          "members": [],
          "name": "norm_layer",
          "params": [
            {
              "description": "Normalization type",
              "name": "norm",
              "type": "str"
            },
            {
              "description": "Name",
              "name": "name",
              "type": "str"
            }
          ],
          "raises": [],
          "returns": [
            {
              "description": "keras.Layer: Layer",
              "type": "keras.Layer"
            }
          ],
          "signature": "norm_layer(norm: str, name: str) -> keras.Layer",
          "source": {
            "line": 61,
            "path": "helia_edge/models/unext.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/models/unext.py#L61"
          },
          "summary": "Normalization layer"
        },
        {
          "description": "Create UNext block",
          "examples": [],
          "id": "helia_edge.models.unext.unext_block",
          "kind": "function",
          "language": "python",
          "members": [],
          "name": "unext_block",
          "params": [],
          "raises": [],
          "returns": [],
          "signature": "unext_block(\n    output_filters: int,\n    expand_ratio: float = 1,\n    kernel_size: int | tuple[int, int] = 3,\n    strides: int | tuple[int, int] = 1,\n    se_ratio: float = 4,\n    dropout: float | None = 0,\n    norm: Literal['batch', 'layer'] | None = 'batch',\n    name: str | None = None,\n) -> keras.Layer",
          "source": {
            "line": 91,
            "path": "helia_edge/models/unext.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/models/unext.py#L91"
          },
          "summary": "Create UNext block"
        },
        {
          "description": "Create UNext TF functional core",
          "examples": [],
          "id": "helia_edge.models.unext.unext_core",
          "kind": "function",
          "language": "python",
          "members": [],
          "name": "unext_core",
          "params": [
            {
              "description": "Input tensor",
              "name": "x",
              "type": "keras.KerasTensor"
            },
            {
              "description": "Model parameters.",
              "name": "params",
              "type": "UNextParams"
            }
          ],
          "raises": [],
          "returns": [
            {
              "description": "keras.KerasTensor: Output tensor",
              "type": "keras.KerasTensor"
            }
          ],
          "signature": "unext_core(x: keras.KerasTensor, params: UNextParams) -> keras.KerasTensor",
          "source": {
            "line": 181,
            "path": "helia_edge/models/unext.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/models/unext.py#L181"
          },
          "summary": "Create UNext TF functional core"
        },
        {
          "description": "Create UNext TF functional model",
          "examples": [],
          "id": "helia_edge.models.unext.unext_layer",
          "kind": "function",
          "language": "python",
          "members": [],
          "name": "unext_layer",
          "params": [
            {
              "description": "Input tensor",
              "name": "inputs",
              "type": "keras.KerasTensor"
            },
            {
              "description": "Model parameters.",
              "name": "params",
              "type": "UNextParams"
            }
          ],
          "raises": [],
          "returns": [
            {
              "description": "keras.KerasTensor: Output tensor",
              "type": "keras.KerasTensor"
            }
          ],
          "signature": "unext_layer(inputs: keras.KerasTensor, params: UNextParams) -> keras.KerasTensor",
          "source": {
            "line": 328,
            "path": "helia_edge/models/unext.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/models/unext.py#L328"
          },
          "summary": "Create UNext TF functional model"
        },
        {
          "description": "Build a UNext model.",
          "examples": [],
          "id": "helia_edge.models.unext.build",
          "kind": "function",
          "language": "python",
          "members": [],
          "name": "build",
          "params": [
            {
              "description": "Model parameters.",
              "name": "params",
              "type": "UNextParams"
            },
            {
              "description": "Input shape without the batch axis; None for a variable axis.",
              "name": "input_shape",
              "type": "tuple[int | None, ...]"
            },
            {
              "default": "None",
              "description": "Static batch size; None for a dynamic batch.",
              "name": "batch_size",
              "type": "int | None"
            },
            {
              "default": "None",
              "description": "Model name; the family when None.",
              "name": "name",
              "type": "str | None"
            }
          ],
          "raises": [],
          "returns": [
            {
              "description": "keras.Model: The model, named ``unext`` unless ``name`` is given.",
              "type": "keras.Model"
            }
          ],
          "signature": "build(\n    params: UNextParams,\n    input_shape: tuple[int | None, ...],\n    *,\n    batch_size: int | None = None,\n    name: str | None = None,\n) -> keras.Model",
          "source": {
            "line": 371,
            "path": "helia_edge/models/unext.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/models/unext.py#L371"
          },
          "summary": "Build a UNext model."
        }
      ]
    }
  ],
  "name": "helia_edge"
}
