# output

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

## Classes

### Output

模型输出流定义。

#### Methods

##### infer_layout

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

在提供形状但没有布局时推断布局。

Returns

 * `Self`: 尽可能推断出 `layout` 的输出模型。

##### validate_layout

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

验证布局与输出形状兼容。

输出布局描述了每个形状轴，因此当提供布局时，|layout| = |shape|。

Returns

 * `Self`: 经过验证的输出模型。

Raises

 * `ValueError`: 如果存在 `N` 但不是第一个，提供了 `layout` 但没有 `shape`，或者布局和形状长度不匹配。

#### Attributes

##### dtype

输出数据的数据类型，例如 `"float32"`。

##### layout

用于解释张量维度的可选字母代码，例如 `"NC"`。

##### name

输出层的名称。

##### shape

可选的输出张量形状。
