# helia_edge.layers.preprocessing.base_augmentation

Unified public-Keras hooks for deterministic preprocessing and augmentation.

## helia_edge.layers.preprocessing.base_augmentation.BaseAugmentationParams

`class` · `python`

```python
BaseAugmentationParams()
```

Shared construction-time configuration; never validates live tensors.

Source: `helia_edge/layers/preprocessing/base_augmentation.py:9`

### helia_edge.layers.preprocessing.base_augmentation.BaseAugmentationParams.model_config

`attribute` · `python`

```python
model_config = ConfigDict(extra='forbid', frozen=True)
```

Source: `helia_edge/layers/preprocessing/base_augmentation.py:12`

### helia_edge.layers.preprocessing.base_augmentation.BaseAugmentationParams.seed

`attribute` · `python`

```python
seed: int | None = None
```

Source: `helia_edge/layers/preprocessing/base_augmentation.py:13`

### helia_edge.layers.preprocessing.base_augmentation.BaseAugmentationParams.auto_vectorize

`attribute` · `python`

```python
auto_vectorize: bool = False
```

Source: `helia_edge/layers/preprocessing/base_augmentation.py:14`

### helia_edge.layers.preprocessing.base_augmentation.BaseAugmentationParams.data_format

`attribute` · `python`

```python
data_format: Literal['channels_first', 'channels_last'] = 'channels_last'
```

Source: `helia_edge/layers/preprocessing/base_augmentation.py:15`

### helia_edge.layers.preprocessing.base_augmentation.BaseAugmentationParams.device

`attribute` · `python`

```python
device: str = 'cpu'
```

Source: `helia_edge/layers/preprocessing/base_augmentation.py:16`

### helia_edge.layers.preprocessing.base_augmentation.BaseAugmentationParams.aligned_targets

`attribute` · `python`

```python
aligned_targets: tuple[str, ...] | None = None
```

Source: `helia_edge/layers/preprocessing/base_augmentation.py:17`

### helia_edge.layers.preprocessing.base_augmentation.BaseAugmentationParams.aligned_masks

`attribute` · `python`

```python
aligned_masks: tuple[str, ...] | None = None
```

Source: `helia_edge/layers/preprocessing/base_augmentation.py:18`

## helia_edge.layers.preprocessing.base_augmentation.BaseAugmentation

`class` · `python`

```python
BaseAugmentation(
    seed=None,
    auto_vectorize=False,
    data_format=None,
    device='cpu',
    aligned_targets=None,
    aligned_masks=None,
    **kwargs={},
)
```

Base for rank-specific transforms, with one sampling/application contract.

Override ``augment_samples`` or ``augment_sample`` and optionally
``get_random_transformations``. Sample parameters once per signal batch;
joint transforms reuse them across aligned signals, targets and masks.
Per-example parameter leaves must have a leading batch axis. Deterministic
subclasses set ``training_only=False``. Bases are not serialized transforms.

Source: `helia_edge/layers/preprocessing/base_augmentation.py:21`

### helia_edge.layers.preprocessing.base_augmentation.BaseAugmentation.SAMPLES

`constant` · `python`

```python
SAMPLES = 'data'
```

Source: `helia_edge/layers/preprocessing/base_augmentation.py:31`

### helia_edge.layers.preprocessing.base_augmentation.BaseAugmentation.LABELS

`constant` · `python`

```python
LABELS = 'labels'
```

Source: `helia_edge/layers/preprocessing/base_augmentation.py:32`

### helia_edge.layers.preprocessing.base_augmentation.BaseAugmentation.TARGETS

`constant` · `python`

```python
TARGETS = 'targets'
```

Source: `helia_edge/layers/preprocessing/base_augmentation.py:33`

### helia_edge.layers.preprocessing.base_augmentation.BaseAugmentation.TRANSFORMS

`constant` · `python`

```python
TRANSFORMS = 'transforms'
```

Source: `helia_edge/layers/preprocessing/base_augmentation.py:34`

### helia_edge.layers.preprocessing.base_augmentation.BaseAugmentation.NDIMS

`constant` · `python`

```python
NDIMS = 4
```

Source: `helia_edge/layers/preprocessing/base_augmentation.py:35`

### helia_edge.layers.preprocessing.base_augmentation.BaseAugmentation.training_only

`attribute` · `python`

```python
training_only = True
```

Source: `helia_edge/layers/preprocessing/base_augmentation.py:36`

### helia_edge.layers.preprocessing.base_augmentation.BaseAugmentation.joint

`attribute` · `python`

```python
joint = False
```

Source: `helia_edge/layers/preprocessing/base_augmentation.py:37`

### helia_edge.layers.preprocessing.base_augmentation.BaseAugmentation.seed

`attribute` · `python`

```python
seed = params.seed
```

Source: `helia_edge/layers/preprocessing/base_augmentation.py:59`

### helia_edge.layers.preprocessing.base_augmentation.BaseAugmentation.auto_vectorize

`attribute` · `python`

```python
auto_vectorize = params.auto_vectorize
```

Source: `helia_edge/layers/preprocessing/base_augmentation.py:60`

### helia_edge.layers.preprocessing.base_augmentation.BaseAugmentation.data_format

`attribute` · `python`

```python
data_format = params.data_format
```

Source: `helia_edge/layers/preprocessing/base_augmentation.py:61`

### helia_edge.layers.preprocessing.base_augmentation.BaseAugmentation.device

`attribute` · `python`

```python
device = params.device
```

Source: `helia_edge/layers/preprocessing/base_augmentation.py:62`

### helia_edge.layers.preprocessing.base_augmentation.BaseAugmentation.aligned_targets

`attribute` · `python`

```python
aligned_targets = params.aligned_targets
```

Source: `helia_edge/layers/preprocessing/base_augmentation.py:63`

### helia_edge.layers.preprocessing.base_augmentation.BaseAugmentation.aligned_masks

`attribute` · `python`

```python
aligned_masks = params.aligned_masks
```

Source: `helia_edge/layers/preprocessing/base_augmentation.py:64`

### helia_edge.layers.preprocessing.base_augmentation.BaseAugmentation.generator

`attribute` · `python`

```python
generator = keras.random.SeedGenerator(self.seed)
```

Source: `helia_edge/layers/preprocessing/base_augmentation.py:65`

### helia_edge.layers.preprocessing.base_augmentation.BaseAugmentation.random_generator

`attribute` · `python`

```python
random_generator
```

Source: `helia_edge/layers/preprocessing/base_augmentation.py:68`

### helia_edge.layers.preprocessing.base_augmentation.BaseAugmentation.ch_axis

`attribute` · `python`

```python
ch_axis
```

Source: `helia_edge/layers/preprocessing/base_augmentation.py:72`

### helia_edge.layers.preprocessing.base_augmentation.BaseAugmentation.data_axis

`attribute` · `python`

```python
data_axis
```

Source: `helia_edge/layers/preprocessing/base_augmentation.py:76`

### helia_edge.layers.preprocessing.base_augmentation.BaseAugmentation.height_axis

`attribute` · `python`

```python
height_axis
```

Source: `helia_edge/layers/preprocessing/base_augmentation.py:80`

### helia_edge.layers.preprocessing.base_augmentation.BaseAugmentation.width_axis

`attribute` · `python`

```python
width_axis
```

Source: `helia_edge/layers/preprocessing/base_augmentation.py:84`

### helia_edge.layers.preprocessing.base_augmentation.BaseAugmentation.get_random_transformations

`method` · `python`

```python
get_random_transformations(input_shape)
```

Return batched parameter tensors, or None for deterministic transforms.

Source: `helia_edge/layers/preprocessing/base_augmentation.py:92`

### helia_edge.layers.preprocessing.base_augmentation.BaseAugmentation.augment_sample

`method` · `python`

```python
augment_sample(inputs)
```

Source: `helia_edge/layers/preprocessing/base_augmentation.py:96`

### helia_edge.layers.preprocessing.base_augmentation.BaseAugmentation.augment_samples

`method` · `python`

```python
augment_samples(inputs)
```

Source: `helia_edge/layers/preprocessing/base_augmentation.py:99`

### helia_edge.layers.preprocessing.base_augmentation.BaseAugmentation.augment_targets

`method` · `python`

```python
augment_targets(inputs)
```

Apply geometry to selected targets using the signal parameters.

Source: `helia_edge/layers/preprocessing/base_augmentation.py:106`

### helia_edge.layers.preprocessing.base_augmentation.BaseAugmentation.augment_masks

`method` · `python`

```python
augment_masks(inputs)
```

Apply geometry to selected masks using the signal parameters.

Source: `helia_edge/layers/preprocessing/base_augmentation.py:110`

### helia_edge.layers.preprocessing.base_augmentation.BaseAugmentation.batch_augment

`method` · `python`

```python
batch_augment(inputs, transformations=None)
```

Apply to a tensor or schema, with optional pre-sampled parameters.

Source: `helia_edge/layers/preprocessing/base_augmentation.py:138`

### helia_edge.layers.preprocessing.base_augmentation.BaseAugmentation.call

`method` · `python`

```python
call(inputs, training=None, transformations=None)
```

Source: `helia_edge/layers/preprocessing/base_augmentation.py:215`

### helia_edge.layers.preprocessing.base_augmentation.BaseAugmentation.get_config

`method` · `python`

```python
get_config()
```

Source: `helia_edge/layers/preprocessing/base_augmentation.py:229`

## helia_edge.layers.preprocessing.base_augmentation.BaseAugmentation1D

`class` · `python`

```python
BaseAugmentation1D(
    seed=None,
    auto_vectorize=False,
    data_format=None,
    device='cpu',
    aligned_targets=None,
    aligned_masks=None,
    **kwargs={},
)
```

One-dimensional signals with optional batch axis.



Base class: [BaseAugmentation](/helia-edge/reference/api/helia_edge/layers/preprocessing/base_augmentation/#helia_edge.layers.preprocessing.base_augmentation.BaseAugmentation).

Inherited 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_samples()](/helia-edge/reference/api/helia_edge/layers/preprocessing/base_augmentation/#helia_edge.layers.preprocessing.base_augmentation.BaseAugmentation.augment_samples), [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), [get_config()](/helia-edge/reference/api/helia_edge/layers/preprocessing/base_augmentation/#helia_edge.layers.preprocessing.base_augmentation.BaseAugmentation.get_config), [get_random_transformations()](/helia-edge/reference/api/helia_edge/layers/preprocessing/base_augmentation/#helia_edge.layers.preprocessing.base_augmentation.BaseAugmentation.get_random_transformations).

Source: `helia_edge/layers/preprocessing/base_augmentation.py:241`

### helia_edge.layers.preprocessing.base_augmentation.BaseAugmentation1D.NDIMS

`constant` · `python`

```python
NDIMS = 3
```

Source: `helia_edge/layers/preprocessing/base_augmentation.py:244`

## helia_edge.layers.preprocessing.base_augmentation.BaseAugmentation2D

`class` · `python`

```python
BaseAugmentation2D(
    seed=None,
    auto_vectorize=False,
    data_format=None,
    device='cpu',
    aligned_targets=None,
    aligned_masks=None,
    **kwargs={},
)
```

Two-dimensional images with optional batch axis.



Base class: [BaseAugmentation](/helia-edge/reference/api/helia_edge/layers/preprocessing/base_augmentation/#helia_edge.layers.preprocessing.base_augmentation.BaseAugmentation).

Inherited 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_samples()](/helia-edge/reference/api/helia_edge/layers/preprocessing/base_augmentation/#helia_edge.layers.preprocessing.base_augmentation.BaseAugmentation.augment_samples), [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), [get_config()](/helia-edge/reference/api/helia_edge/layers/preprocessing/base_augmentation/#helia_edge.layers.preprocessing.base_augmentation.BaseAugmentation.get_config), [get_random_transformations()](/helia-edge/reference/api/helia_edge/layers/preprocessing/base_augmentation/#helia_edge.layers.preprocessing.base_augmentation.BaseAugmentation.get_random_transformations).

Source: `helia_edge/layers/preprocessing/base_augmentation.py:247`

### helia_edge.layers.preprocessing.base_augmentation.BaseAugmentation2D.NDIMS

`constant` · `python`

```python
NDIMS = 4
```

Source: `helia_edge/layers/preprocessing/base_augmentation.py:250`
