{
  "$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": "# Normalization Layers API\n\nThis module provides classes to build normalization layers.\n\n**Classes**\n\n| Name | Description |\n| --- | --- |\n| `LayerNormalization` | Keras layer normalization that also runs on the Torch backend for any axes |\n\n**Functions**\n\n| Name | Description |\n| --- | --- |\n| `layer_normalization` | Layer normalization |\n| `batch_normalization` | Batch normalization |\n| `normalization` | Normalization builder layer |\n\nPlease check [Keras Normalization Layers](https://keras.io/api/layers/normalization_layers/) for additional layers.",
      "name": "normalization",
      "path": "helia_edge.layers.normalization",
      "submodules": [],
      "summary": "Normalization Layers API",
      "symbols": [
        {
          "description": "Keras ``LayerNormalization`` that also normalizes non-trailing axes on the Torch backend.\n\nKeras 3's Torch backend normalizes trailing axes only, so axes such as ``(1, 2)`` of a\n``(batch, height, width, channels)`` input fail there. On Torch, this layer moves the\nnormalized axes last, normalizes and moves them back. On other backends it is the Keras layer,\nwith the same weights, configuration and graph.\n\nSaved models record this class as ``helia_edge>LayerNormalization``: load them with\n``helia_edge.models.load_model``, or call ``helia_edge.register_keras_serializables()`` before\n``keras.saving.load_model``.",
          "examples": [],
          "id": "helia_edge.layers.normalization.LayerNormalization",
          "kind": "class",
          "language": "python",
          "members": [
            {
              "description": "",
              "examples": [],
              "id": "helia_edge.layers.normalization.LayerNormalization.call",
              "kind": "method",
              "language": "python",
              "members": [],
              "name": "call",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "call(inputs)",
              "source": {
                "line": 37,
                "path": "helia_edge/layers/normalization.py",
                "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/layers/normalization.py#L37"
              },
              "summary": ""
            }
          ],
          "name": "LayerNormalization",
          "params": [],
          "raises": [],
          "returns": [],
          "signature": "LayerNormalization()",
          "source": {
            "line": 23,
            "path": "helia_edge/layers/normalization.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/layers/normalization.py#L23"
          },
          "summary": "Keras LayerNormalization that also normalizes non-trailing axes on the Torch backend."
        },
        {
          "description": "Layer normalization\n\nIf axis is None, this layer will infer based on the input tensor shape:\n\n* If rank is 4 (B, H, W, C), normalize over H, W\n* If rank is 3 (B, T, C), normalize over T\n* If rank is 2 (B, C), normalize over C",
          "examples": [],
          "id": "helia_edge.layers.normalization.layer_normalization",
          "kind": "function",
          "language": "python",
          "members": [],
          "name": "layer_normalization",
          "params": [
            {
              "default": "None",
              "description": "Layer name. Defaults to None.",
              "name": "name",
              "type": "str | None"
            },
            {
              "default": "None",
              "description": "Axis. Defaults to None.",
              "name": "axis",
              "type": "int | tuple[int] | None"
            },
            {
              "default": "True",
              "description": "Scale. Defaults to True.",
              "name": "scale",
              "type": "bool"
            }
          ],
          "raises": [],
          "returns": [
            {
              "description": "keras.Layer: Layer",
              "type": "keras.Layer"
            }
          ],
          "signature": "layer_normalization(name: str | None = None, axis: int | tuple[int] | None = None, scale: bool = True) -> keras.Layer",
          "source": {
            "line": 63,
            "path": "helia_edge/layers/normalization.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/layers/normalization.py#L63"
          },
          "summary": "Layer normalization"
        },
        {
          "description": "Batch normalization",
          "examples": [],
          "id": "helia_edge.layers.normalization.batch_normalization",
          "kind": "function",
          "language": "python",
          "members": [],
          "name": "batch_normalization",
          "params": [
            {
              "default": "None",
              "description": "Layer name. Defaults to None.",
              "name": "name",
              "type": "str | None"
            },
            {
              "default": "0.9",
              "description": "Momentum. Defaults to 0.9.",
              "name": "momentum",
              "type": "float"
            },
            {
              "default": "0.001",
              "description": "Epsilon. Defaults to 1e-3.",
              "name": "epsilon",
              "type": "float"
            },
            {
              "default": "-1",
              "description": "Axis. Defaults to None.",
              "name": "axis",
              "type": "int | None"
            }
          ],
          "raises": [],
          "returns": [
            {
              "description": "keras.Layer: Layer",
              "type": "keras.Layer"
            }
          ],
          "signature": "batch_normalization(name: str | None = None, momentum=0.9, epsilon=0.001, axis: int | None = -1) -> keras.Layer",
          "source": {
            "line": 128,
            "path": "helia_edge/layers/normalization.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/layers/normalization.py#L128"
          },
          "summary": "Batch normalization"
        },
        {
          "description": "Creates normalization layer based on type",
          "examples": [],
          "id": "helia_edge.layers.normalization.normalization",
          "kind": "function",
          "language": "python",
          "members": [],
          "name": "normalization",
          "params": [
            {
              "description": "Normalization type",
              "name": "norm",
              "type": "str"
            },
            {
              "description": "Name",
              "name": "name",
              "type": "str"
            }
          ],
          "raises": [],
          "returns": [
            {
              "description": "Layer",
              "name": "KerasLayer",
              "type": "keras.Layer"
            }
          ],
          "signature": "normalization(norm: str, name: str, **kwargs={}) -> keras.Layer",
          "source": {
            "line": 158,
            "path": "helia_edge/layers/normalization.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/layers/normalization.py#L158"
          },
          "summary": "Creates normalization layer based on type"
        }
      ]
    }
  ],
  "name": "helia_edge"
}
