# helia_edge.layers.preprocessing.random_cutout

Signal-only occlusion with explicit half-open intervals and owned RNG.

## helia_edge.layers.preprocessing.random_cutout.interval_mask

`function` · `python`

```python
interval_mask(layer, shape, axis, minimum, maximum)
```

Sample one interval per example; returned mask broadcasts over channels.

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

## helia_edge.layers.preprocessing.random_cutout.RandomCutout1D

`class` · `python`

```python
RandomCutout1D(factor=0.1, cutouts=1, fill_mode='constant', fill_value=0.0, **kwargs={})
```

Replace random temporal intervals in each example during training.

Regions share their positions across channels. Targets and masks remain
unchanged; only signal values are occluded. Overlapping regions are allowed.



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

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_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).

**Parameters**

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| factor | float \| tuple[float, float] | 0.1 | Fractional size bounds in [0, 1] for each spatial axis. A scalar sets the upper bound with a zero lower bound; a pair sets both bounds. |
| cutouts | int | 1 | Nonnegative number of regions sampled per example. |
| fill_mode | str | 'constant' | "constant" for a fixed value or "normal" for Gaussian noise. |
| fill_value | float | 0.0 | Constant fill value, or the nonnegative standard deviation of zero-mean Gaussian noise when fill_mode is "normal". |
| **kwargs | Any | {} | Base augmentation options, including seed and data_format. |

**Raises**

| Name | Description |
| --- | --- |
| ValueError | Size bounds, region count, fill mode or noise deviation violate these constraints. |

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

### helia_edge.layers.preprocessing.random_cutout.RandomCutout1D.get_random_transformations

`method` · `python`

```python
get_random_transformations(input_shape)
```

Source: `helia_edge/layers/preprocessing/random_cutout.py:89`

### helia_edge.layers.preprocessing.random_cutout.RandomCutout1D.augment_samples

`method` · `python`

```python
augment_samples(inputs)
```

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

### helia_edge.layers.preprocessing.random_cutout.RandomCutout1D.get_config

`method` · `python`

```python
get_config()
```

Source: `helia_edge/layers/preprocessing/random_cutout.py:98`

## helia_edge.layers.preprocessing.random_cutout.RandomCutout2D

`class` · `python`

```python
RandomCutout2D(factor=0.1, cutouts=1, fill_mode='constant', fill_value=0.0, **kwargs={})
```

Replace random rectangular regions in each example during training.

Regions share their positions across channels. Targets and masks remain
unchanged; only signal values are occluded. Overlapping regions are allowed.



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

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_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).

**Parameters**

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| factor | float \| tuple[float, float] | 0.1 | Fractional size bounds in [0, 1] for each spatial axis. A scalar sets the upper bound with a zero lower bound; a pair sets both bounds. |
| cutouts | int | 1 | Nonnegative number of regions sampled per example. |
| fill_mode | str | 'constant' | "constant" for a fixed value or "normal" for Gaussian noise. |
| fill_value | float | 0.0 | Constant fill value, or the nonnegative standard deviation of zero-mean Gaussian noise when fill_mode is "normal". |
| **kwargs | Any | {} | Base augmentation options, including seed and data_format. |

**Raises**

| Name | Description |
| --- | --- |
| ValueError | Size bounds, region count, fill mode or noise deviation violate these constraints. |

Source: `helia_edge/layers/preprocessing/random_cutout.py:102`

### helia_edge.layers.preprocessing.random_cutout.RandomCutout2D.get_random_transformations

`method` · `python`

```python
get_random_transformations(input_shape)
```

Source: `helia_edge/layers/preprocessing/random_cutout.py:127`

### helia_edge.layers.preprocessing.random_cutout.RandomCutout2D.augment_samples

`method` · `python`

```python
augment_samples(inputs)
```

Source: `helia_edge/layers/preprocessing/random_cutout.py:130`

### helia_edge.layers.preprocessing.random_cutout.RandomCutout2D.get_config

`method` · `python`

```python
get_config()
```

Source: `helia_edge/layers/preprocessing/random_cutout.py:136`
