# helia_edge.layers.preprocessing.sample

Typed containers for tensor payloads; record metadata stays with the caller.

## helia_edge.layers.preprocessing.sample.T

`constant` · `python`

```python
T = TypeVar('T')
```

Source: `helia_edge/layers/preprocessing/sample.py:6`

## helia_edge.layers.preprocessing.sample.TensorPayload

`class` · `python`

```python
TensorPayload()
```

Two-level tensor-only schema accepted by portable preprocessing layers.

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

### helia_edge.layers.preprocessing.sample.TensorPayload.signals

`attribute` · `python`

```python
signals: dict[str, T]
```

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

### helia_edge.layers.preprocessing.sample.TensorPayload.targets

`attribute` · `python`

```python
targets: dict[str, T]
```

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

### helia_edge.layers.preprocessing.sample.TensorPayload.masks

`attribute` · `python`

```python
masks: dict[str, T]
```

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

## helia_edge.layers.preprocessing.sample.Sample

`class` · `python`

```python
Sample(signals: dict[str, T], targets: dict[str, T] = dict(), masks: dict[str, T] = dict()) -> None
```

`dataclass`

Live tensor facade, not a serializable model config or an immutable tensor.

Conversion creates new dictionaries but never copies tensor storage. Keys in
each group name tensor leaves. Keep record IDs and other metadata outside this
object, and pass ``sample.tensor_tree()`` to a Keras layer.

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

### helia_edge.layers.preprocessing.sample.Sample.signals

`attribute` · `python`

```python
signals: dict[str, T]
```

Source: `helia_edge/layers/preprocessing/sample.py:26`

### helia_edge.layers.preprocessing.sample.Sample.targets

`attribute` · `python`

```python
targets: dict[str, T] = field(default_factory=dict)
```

Source: `helia_edge/layers/preprocessing/sample.py:27`

### helia_edge.layers.preprocessing.sample.Sample.masks

`attribute` · `python`

```python
masks: dict[str, T] = field(default_factory=dict)
```

Source: `helia_edge/layers/preprocessing/sample.py:28`

### helia_edge.layers.preprocessing.sample.Sample.tensor_tree

`method` · `python`

```python
tensor_tree() -> TensorPayload[T]
```

Return fresh containers referencing the original tensor leaves.

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