# luxonis_output

Python API: `luxonis_train.lightning.luxonis_output`

The result of one forward pass of the node graph.

## Classes

### LuxonisOutput

The result of one forward pass.

[LuxonisLightningModule.full_forward](https://docs.luxonis.com/software-v3/ai-inference/model-source/training/luxonis-train/luxonis-train-api-reference/lightning/luxonis_lightning.md)
creates it. The node name is the key of each dictionary. The string form shows the shapes of the outputs and of the
visualizations, and the values of the losses. It does not show the metrics.

> **Example**
> ```pycon
>>> import torch
>>> from luxonis_train.lightning import LuxonisOutput
>>> output = LuxonisOutput(
...     outputs={"head": {"boxes": torch.zeros(2, 4)}}, losses={}
... )
>>> print(output)
LuxonisOutput(
{'losses': {},
 'outputs': {'head': {'boxes': torch.Size([2, 4])}},
 'visualizations': {}}
)
```

#### Attributes

##### losses

The value of each loss of a node, keyed by loss name. A value is a tensor, or a tuple of the tensor and its sub-losses.

##### metrics

The metric values of each node, keyed by metric name. [LuxonisLightningModule.full_forward](https://docs.luxonis.com/software-v3/ai-inference/model-source/training/luxonis-train/luxonis-train-api-reference/lightning/luxonis_lightning.md) leaves it empty.

##### outputs

The output packet of each output node.

##### visualizations

The image batch of each visualizer of a node, keyed by visualizer name.
