# helia_edge.layers.preprocessing.rescaling

## Rescaling Layer API

This module provides classes to build rescaling layers.

**Classes**

| Name | Description |
| --- | --- |
| `Rescaling1D` | Rescaling 1D |
| `Rescaling2D` | Rescaling 2D |

## helia_edge.layers.preprocessing.rescaling.Rescaling1D

`class` · `python`

```python
Rescaling1D(scale: float, **kwargs={})
```

Rescale the input samples.



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

**Parameters**

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| scale | float | Required | The scaling factor. |

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

### helia_edge.layers.preprocessing.rescaling.Rescaling1D.training_only

`attribute` · `python`

```python
training_only = False
```

Source: `helia_edge/layers/preprocessing/rescaling.py:20`

### helia_edge.layers.preprocessing.rescaling.Rescaling1D.scale

`attribute` · `python`

```python
scale: float = scale
```

Source: `helia_edge/layers/preprocessing/rescaling.py:30`

### helia_edge.layers.preprocessing.rescaling.Rescaling1D.augment_samples

`method` · `python`

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

Rescale a batch of samples during training.

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

### helia_edge.layers.preprocessing.rescaling.Rescaling1D.get_config

`method` · `python`

```python
get_config()
```

Serialize the configuration.

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

## helia_edge.layers.preprocessing.rescaling.Rescaling2D

`class` · `python`

```python
Rescaling2D(scale: float, **kwargs={})
```

Rescale the input samples.



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

**Parameters**

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| scale | float | Required | The scaling factor. |

Source: `helia_edge/layers/preprocessing/rescaling.py:44`

### helia_edge.layers.preprocessing.rescaling.Rescaling2D.training_only

`attribute` · `python`

```python
training_only = False
```

Source: `helia_edge/layers/preprocessing/rescaling.py:46`

### helia_edge.layers.preprocessing.rescaling.Rescaling2D.scale

`attribute` · `python`

```python
scale: float = scale
```

Source: `helia_edge/layers/preprocessing/rescaling.py:56`

### helia_edge.layers.preprocessing.rescaling.Rescaling2D.augment_samples

`method` · `python`

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

Rescale a batch of samples during training.

Source: `helia_edge/layers/preprocessing/rescaling.py:58`

### helia_edge.layers.preprocessing.rescaling.Rescaling2D.get_config

`method` · `python`

```python
get_config()
```

Serialize the configuration.

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