class documentation
class Output(BaseModelExtraForbid):
Model output stream definition.
| Method | infer |
Infer the layout when a shape is provided without one. |
| Method | validate |
Validate that the layout is compatible with the output shape. |
| Instance Variable | dtype |
Data type of the output data, such as "float32". |
| Instance Variable | layout |
Optional letter code for interpreting tensor dimensions, such as "NC". |
| Instance Variable | name |
Name of the output layer. |
| Instance Variable | shape |
Optional output tensor shape. |
Infer the layout when a shape is provided without one.
| Returns | |
Self | The output model with layout inferred when possible. |
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. |