The output block doesn’t affect training, but allows to return extra data, which can come from any layer, to the predictions made by a deployed model.

There can be several Output blocks in a model. If one or more Output blocks are connected to the model graph, you can remove target feature that is used for training from the predicitons of the deployed model.

The Output block is ignored during model training and doesn’t affect performance.


A model is trained to predict a target feature from examples.
However, some deep learning techniques then use the model to not only get predictions about the target feature, but to also get values from intermediate layers of the model.

This is the case for instance with autoencoders, feature embedding, similarity search, or if you simply want to check what the model is calculating.


We want to compress images of handwritten digits into simple (x,y) coordinates, so that we can compare two images quickly simply by comparing their coordinates.

  • To learn usable (x,y) coordinates, we train an autoencoder to compress an image then reconstruct it, using the same image for both the Input and the Target block feature.

  • When querying the model, we will want to get the (x,y) coordinates of any image submitted, so we connect an Output block to the model graph and set its Name to coordinates.

  • In this particular case we are not interested in getting the reconstructed image from the model, which would needlessly return too much data. So we can uncheck Use for predictions in the Target block settings.

Autoencoder with output block
Figure 1. This model is trained using a target feature, but the values we actually interested in are the coordinates from the middle layer. The output block allows the model to return these values in its predictions.


Since the Output blocks are ignored during model training, the model graph must remain valid if all Output blocks were removed.

This means that an Output block cannot be the only block connected after any of the other blocks. This is not allowed even if a block doesn’t learn anything during training, e.g, the Reshape or the Add blocks.


Invalid use of Output block.
Figure 2. These uses of the Output block are not allowed, since deleting the Output blocks would make the model graphs invalid.


Label: The label of the data coming from a particular output block, used to identify the data when you request predictions from the with the deployed model using the Deployment API.

Was this page helpful?