{
  "$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": "# Frequency Mix Style Layer API\n\nThis module provides classes to perform frequency mix style augmentation.\n\n**Classes**\n\n| Name | Description |\n| --- | --- |\n| `FrequencyMixStyle2D` | 2D frequency mix style augmentation |",
      "name": "frequency_mix_style",
      "path": "helia_edge.layers.preprocessing.frequency_mix_style",
      "submodules": [],
      "summary": "Frequency Mix Style Layer API",
      "symbols": [
        {
          "description": "Apply frequency mix style augmentation to the 2D input.\n\nExample:\n\n```python\n    x = np.random.rand(4, 4, 3)\n    lyr = FrequencyMixStyle2D(probability=1.0, alpha=1.0)\n    y = lyr(x, training=True)\n```\n\n\n\nBase class: [BaseAugmentation2D](/helia-edge/reference/api/helia_edge/layers/preprocessing/base_augmentation/#helia_edge.layers.preprocessing.base_augmentation.BaseAugmentation2D).\n\nInherited from [BaseAugmentation](/helia-edge/reference/api/helia_edge/layers/preprocessing/base_augmentation/#helia_edge.layers.preprocessing.base_augmentation.BaseAugmentation): [augment_masks()](/helia-edge/reference/api/helia_edge/layers/preprocessing/base_augmentation/#helia_edge.layers.preprocessing.base_augmentation.BaseAugmentation.augment_masks), [augment_sample()](/helia-edge/reference/api/helia_edge/layers/preprocessing/base_augmentation/#helia_edge.layers.preprocessing.base_augmentation.BaseAugmentation.augment_sample), [augment_targets()](/helia-edge/reference/api/helia_edge/layers/preprocessing/base_augmentation/#helia_edge.layers.preprocessing.base_augmentation.BaseAugmentation.augment_targets), [batch_augment()](/helia-edge/reference/api/helia_edge/layers/preprocessing/base_augmentation/#helia_edge.layers.preprocessing.base_augmentation.BaseAugmentation.batch_augment), [call()](/helia-edge/reference/api/helia_edge/layers/preprocessing/base_augmentation/#helia_edge.layers.preprocessing.base_augmentation.BaseAugmentation.call).",
          "examples": [],
          "id": "helia_edge.layers.preprocessing.frequency_mix_style.FrequencyMixStyle2D",
          "kind": "class",
          "language": "python",
          "members": [
            {
              "description": "",
              "examples": [],
              "id": "helia_edge.layers.preprocessing.frequency_mix_style.FrequencyMixStyle2D.probability",
              "kind": "attribute",
              "language": "python",
              "members": [],
              "name": "probability",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "probability: float = probability",
              "source": {
                "line": 49,
                "path": "helia_edge/layers/preprocessing/frequency_mix_style.py",
                "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/layers/preprocessing/frequency_mix_style.py#L49"
              },
              "summary": ""
            },
            {
              "description": "",
              "examples": [],
              "id": "helia_edge.layers.preprocessing.frequency_mix_style.FrequencyMixStyle2D.alpha",
              "kind": "attribute",
              "language": "python",
              "members": [],
              "name": "alpha",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "alpha: float = alpha",
              "source": {
                "line": 50,
                "path": "helia_edge/layers/preprocessing/frequency_mix_style.py",
                "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/layers/preprocessing/frequency_mix_style.py#L50"
              },
              "summary": ""
            },
            {
              "description": "",
              "examples": [],
              "id": "helia_edge.layers.preprocessing.frequency_mix_style.FrequencyMixStyle2D.epsilon",
              "kind": "attribute",
              "language": "python",
              "members": [],
              "name": "epsilon",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "epsilon: float = epsilon",
              "source": {
                "line": 51,
                "path": "helia_edge/layers/preprocessing/frequency_mix_style.py",
                "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/layers/preprocessing/frequency_mix_style.py#L51"
              },
              "summary": ""
            },
            {
              "description": "Generate noise distortion tensor",
              "examples": [],
              "id": "helia_edge.layers.preprocessing.frequency_mix_style.FrequencyMixStyle2D.get_random_transformations",
              "kind": "method",
              "language": "python",
              "members": [],
              "name": "get_random_transformations",
              "params": [
                {
                  "description": "Input shape.",
                  "name": "input_shape",
                  "type": "tuple[int, ...]"
                }
              ],
              "raises": [],
              "returns": [
                {
                  "description": "Dictionary containing the noise tensor.",
                  "name": "dict",
                  "type": "dict"
                }
              ],
              "signature": "get_random_transformations(input_shape: tuple[int, int, int]) -> dict",
              "source": {
                "line": 53,
                "path": "helia_edge/layers/preprocessing/frequency_mix_style.py",
                "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/layers/preprocessing/frequency_mix_style.py#L53"
              },
              "summary": "Generate noise distortion tensor"
            },
            {
              "description": "Apply mixstyle augmentation",
              "examples": [],
              "id": "helia_edge.layers.preprocessing.frequency_mix_style.FrequencyMixStyle2D.apply_mixstyle",
              "kind": "method",
              "language": "python",
              "members": [],
              "name": "apply_mixstyle",
              "params": [
                {
                  "description": "Input tensor",
                  "name": "x",
                  "type": "tf.Tensor"
                },
                {
                  "description": "Lambda tensor",
                  "name": "lmda",
                  "type": "tf.Tensor"
                },
                {
                  "description": "Permutation tensor",
                  "name": "perm",
                  "type": "tf.Tensor"
                }
              ],
              "raises": [],
              "returns": [
                {
                  "description": "tf.Tensor: Augmented tensor",
                  "type": "keras.KerasTensor"
                }
              ],
              "signature": "apply_mixstyle(x: keras.KerasTensor, lmda: keras.KerasTensor, perm: keras.KerasTensor) -> keras.KerasTensor",
              "source": {
                "line": 72,
                "path": "helia_edge/layers/preprocessing/frequency_mix_style.py",
                "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/layers/preprocessing/frequency_mix_style.py#L72"
              },
              "summary": "Apply mixstyle augmentation"
            },
            {
              "description": "Augment samples",
              "examples": [],
              "id": "helia_edge.layers.preprocessing.frequency_mix_style.FrequencyMixStyle2D.augment_samples",
              "kind": "method",
              "language": "python",
              "members": [],
              "name": "augment_samples",
              "params": [
                {
                  "description": "Input tensor",
                  "name": "inputs",
                  "type": "tf.Tensor"
                }
              ],
              "raises": [],
              "returns": [
                {
                  "description": "tf.Tensor: Augmented tensor",
                  "type": "keras.KerasTensor"
                }
              ],
              "signature": "augment_samples(inputs) -> keras.KerasTensor",
              "source": {
                "line": 97,
                "path": "helia_edge/layers/preprocessing/frequency_mix_style.py",
                "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/layers/preprocessing/frequency_mix_style.py#L97"
              },
              "summary": "Augment samples"
            },
            {
              "description": "",
              "examples": [],
              "id": "helia_edge.layers.preprocessing.frequency_mix_style.FrequencyMixStyle2D.get_config",
              "kind": "method",
              "language": "python",
              "members": [],
              "name": "get_config",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "get_config()",
              "source": {
                "line": 117,
                "path": "helia_edge/layers/preprocessing/frequency_mix_style.py",
                "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/layers/preprocessing/frequency_mix_style.py#L117"
              },
              "summary": ""
            }
          ],
          "name": "FrequencyMixStyle2D",
          "params": [
            {
              "default": "0.5",
              "description": "Probability of applying the augmentation.",
              "name": "probability",
              "type": "float"
            },
            {
              "default": "1.0",
              "description": "Mixup alpha value.",
              "name": "alpha",
              "type": "float"
            },
            {
              "default": "1e-06",
              "description": "Epsilon value for numerical stability.",
              "name": "epsilon",
              "type": "float"
            }
          ],
          "raises": [],
          "returns": [],
          "signature": "FrequencyMixStyle2D(probability: float = 0.5, alpha: float = 1.0, epsilon: float = 1e-06, **kwargs={})",
          "source": {
            "line": 17,
            "path": "helia_edge/layers/preprocessing/frequency_mix_style.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/layers/preprocessing/frequency_mix_style.py#L17"
          },
          "summary": "Apply frequency mix style augmentation to the 2D input."
        }
      ]
    }
  ],
  "name": "helia_edge"
}
