# luxonis_output

Python API: `luxonis_train.lightning.luxonis_output`

The result of one forward pass of the node graph.

## Classes

| Name | Description |
| --- | --- |
| [`LuxonisOutput`](https://docs.luxonis.com/software-v3/ai-inference/model-source/training/luxonis-train/luxonis-train-api-reference/lightning/luxonis_output.md#luxonis_output-Classes-LuxonisOutput) | The result of one forward pass. |

### class `LuxonisOutput`

```python
class 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#luxonis_lightning-Classes-LuxonisLightningModule-full_forward)
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

| Name | Type | Description |
| --- | --- | --- |
| `losses` | `dict[str, dict[str, Tensor | tuple[Tensor, dict[str, Tensor]]]]` | 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` | `dict[str, dict[str, Tensor]]` | 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#luxonis_lightning-Classes-LuxonisLightningModule-full_forward) leaves it empty. |
| `outputs` | `dict[str, Packet[Tensor]]` | The output packet of each output node. |
| `visualizations` | `dict[str, dict[str, Tensor]]` | The image batch of each visualizer of a node, keyed by visualizer name. |
