# output

Python API: `luxonis_ml.nn_archive.config_building_blocks.base_models.output`

## Classes

### Output

Model output stream definition.

#### Methods

##### infer_layout

```python
def infer_layout(self) -> Self:
```

Infer the layout when a shape is provided without one.

Returns

 * `Self`: The output model with `layout` inferred when possible.

##### validate_layout

```python
def validate_layout(self) -> Self:
```

Validate that the layout is compatible with the output shape.

The output layout describes every shape axis, so |layout| = |shape| whenever a layout is provided.

Returns

 * `Self`: The validated output model.

Raises

 * `ValueError`: If `N` is present but not first, `layout` is provided without `shape`, or layout and shape lengths do not match.

#### Attributes

##### dtype

Data type of the output data, such as `"float32"`.

##### layout

Optional letter code for interpreting tensor dimensions, such as `"NC"`.

##### name

Name of the output layer.

##### shape

Optional output tensor shape.
