Concatenate

The Concatenate block merges from 2 to 5 inputs into a single output that can be connected into other blocks. This action is similar to creating feature sets, although you can use it anywhere inside your model and it is more adaptable to the data shape.

Concatenate block with 5 inputs.
Figure 1. Concatenate block with 5 inputs, resulting in a single output.

Inputs

Number of inputs

You can concatenate between 2 and 5 inputs per concatenate block. This number has to be selected when the block is created.

To change the number of inputs of an existing block, you will need to delete this block and create a new one.

Order of inputs

You can connect inputs to the concatenate block in any order you want. However, it is worth it to keep an ordering that is consistent:

  • With the meaning of your data, if there is any. For instance, when concatenating the left and right side of an image, you should connect the left side to input 0 and the right side to input 1.

  • Between experiments, so that you can copy the weights that were trained in one experiment into another experiment.

Size of inputs

The size of all the inputs must be identical on each axis that is not the axis of concatenation.

Examples

Joining different features

Concatenating can be useful to merge features coming from different parts of the model. See: Merge image features with tabular data as showcased in the tutorial Predict California house prices.

Joining image tiles

You can also use the Concatenate block to join together multiple images that are tiles of a bigger map.

Parameters

Axis: Axis along which to concatenate, starting at 1 for the first axis. Default: -1, meaning the last axis.