{
  "$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": "Training steps that dispatch on the active Keras backend.",
      "name": "steps",
      "path": "helia_edge.trainers.steps",
      "submodules": [],
      "summary": "Training steps that dispatch on the active Keras backend.",
      "symbols": [
        {
          "description": "The active Keras backend is not supported by this trainer.",
          "examples": [],
          "id": "helia_edge.trainers.steps.NotSupported",
          "kind": "class",
          "language": "python",
          "members": [],
          "name": "NotSupported",
          "params": [],
          "raises": [],
          "returns": [],
          "signature": "NotSupported()",
          "source": {
            "line": 12,
            "path": "helia_edge/trainers/steps.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/trainers/steps.py#L12"
          },
          "summary": "The active Keras backend is not supported by this trainer."
        },
        {
          "description": "Return the active backend, or raise ``NotSupported`` naming ``feature`` and ``supported``.",
          "examples": [],
          "id": "helia_edge.trainers.steps.require_backend",
          "kind": "function",
          "language": "python",
          "members": [],
          "name": "require_backend",
          "params": [],
          "raises": [],
          "returns": [],
          "signature": "require_backend(feature: str, supported: Sequence[str]) -> str",
          "source": {
            "line": 16,
            "path": "helia_edge/trainers/steps.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/trainers/steps.py#L16"
          },
          "summary": "Return the active backend, or raise NotSupported naming feature and supported."
        },
        {
          "description": "Disable gradient tracking on Torch; a no-op on other backends.",
          "examples": [],
          "id": "helia_edge.trainers.steps.no_grad",
          "kind": "function",
          "language": "python",
          "members": [],
          "name": "no_grad",
          "params": [],
          "raises": [],
          "returns": [],
          "signature": "no_grad() -> Iterator[None]",
          "source": {
            "line": 24,
            "path": "helia_edge/trainers/steps.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/trainers/steps.py#L24"
          },
          "summary": "Disable gradient tracking on Torch; a no-op on other backends."
        },
        {
          "description": "Differentiate ``loss_fn`` with the active backend and apply ``model.optimizer`` once.",
          "examples": [],
          "id": "helia_edge.trainers.steps.gradient_step",
          "kind": "function",
          "language": "python",
          "members": [],
          "name": "gradient_step",
          "params": [
            {
              "description": "Compiled model whose optimizer applies the update.",
              "name": "model",
              "type": "keras.Model"
            },
            {
              "description": "Computes ``(loss, *outputs)`` from the model's current weights.",
              "name": "loss_fn",
              "type": "Callable[[], tuple[Any, ...]]"
            },
            {
              "default": "None",
              "description": "Variables to update; when None, the model's trainable weights after ``loss_fn``\nruns, so variables created by a first (building) call are included. Variables without a\ngradient are skipped.",
              "name": "variables",
              "type": "Sequence[Any] | None"
            }
          ],
          "raises": [
            {
              "description": "On backends other than TensorFlow and Torch.",
              "type": "NotSupported"
            }
          ],
          "returns": [
            {
              "description": "What ``loss_fn`` returned.",
              "name": "tuple",
              "type": "tuple[Any, ...]"
            }
          ],
          "signature": "gradient_step(\n    model: keras.Model,\n    loss_fn: Callable[[], tuple[Any, ...]],\n    variables: Sequence[Any] | None = None,\n) -> tuple[Any, ...]",
          "source": {
            "line": 37,
            "path": "helia_edge/trainers/steps.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/trainers/steps.py#L37"
          },
          "summary": "Differentiate lossfn with the active backend and apply model.optimizer once."
        }
      ]
    }
  ],
  "name": "helia_edge"
}
