# helia_edge.layers.preprocessing.random_channel

## Random Channel Layer API

This module provides classes to build random channel layers.

**Classes**

| Name | Description |
| --- | --- |
| `RandomChannel` | Random channel |

## helia_edge.layers.preprocessing.random_channel.RandomChannel

`class` · `python`

```python
RandomChannel(batchwise: bool = False, **kwargs={})
```

Randomly picks a single channel from the input samples.



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_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 |
| --- | --- | --- | --- |
| batchwise | bool | False | If True, grabs same channel from all samples in batch. |

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

### helia_edge.layers.preprocessing.random_channel.RandomChannel.batchwise

`attribute` · `python`

```python
batchwise: bool = batchwise
```

Source: `helia_edge/layers/preprocessing/random_channel.py:29`

### helia_edge.layers.preprocessing.random_channel.RandomChannel.get_random_transformations

`method` · `python`

```python
get_random_transformations(input_shape)
```

Generate random channel index.

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

### helia_edge.layers.preprocessing.random_channel.RandomChannel.augment_samples

`method` · `python`

```python
augment_samples(inputs)
```

Augment samples

Source: `helia_edge/layers/preprocessing/random_channel.py:50`

### helia_edge.layers.preprocessing.random_channel.RandomChannel.augment_sample

`method` · `python`

```python
augment_sample(inputs) -> keras.KerasTensor
```

Augment a sample during training.

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

### helia_edge.layers.preprocessing.random_channel.RandomChannel.get_config

`method` · `python`

```python
get_config()
```

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