# tff.learning.models.BatchOutput

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/federated/blob/v0.87.0 Version 2.0, January 2004 Licensed under the Apache License, Version 2.0 (the) |

A structure that holds the output of a [`tff.learning.models.VariableModel`](https://www.tensorflow.org/federated/api_docs/python/tff/learning/models/VariableModel).

    tff.learning.models.BatchOutput(
        loss=None, predictions=None, num_examples=None
    )

### Used in the notebooks

| Used in the tutorials |
|---|
| - [Federated Learning for Image Classification](https://www.tensorflow.org/federated/tutorials/federated_learning_for_image_classification) |

> [!NOTE]
> **Note:** All fields are optional (may be None).

<br />

<br />

<br />

| ## Attributes ||
|---|---|
| `loss` | The scalar mean loss on the examples in the batch. If the model has multiple losses, it is the sum of all the individual losses. |
| `predictions` | Tensor of predictions on the examples. The first dimension must be the same size (the size of the batch). |
| `num_examples` | Number of examples seen in the batch. |

<br />