Setup and add the concatenate layer into the model during the definition graph step. Type : polymorphic.
| Models in : array, model architecture. |
| name (optional) : string, name of the layer. |
| Model out : model architecture. |
All layer used for concatenation must have the same shape, except along the concatenation axis.
Refer to each layer’s output shape and ensure compatibility on all axes except the concatenation one.
The output shape is identical to the input shape, except on the concatenation axis, where the sizes are summed.
All these exemples are snippets PNG, you can drop these Snippet onto the block diagram and get the depicted code added to your VI (Do not forget to install Deep Learning library to run it).
1 – Generate a set of data
We generate an array of data of type single and shape [batch_size = 10, input_dim = 5] (same input shape).
2 – Define graph
We first define two input layers named input_dense1 and input_dense2. This layers is setup as an input array shaped [input_dim = 5].
In order to have same output shape for added dense layers we define for both of these the same “units” parameter (units = 5) (refer Dense layer add to graph documentation for more details).
Then we build an array of the two graphs generated by the dense layers and inject it into the input of the Concatenate layer.
3 – Summarize graph
Returns the summary of the model in file text.
3 – Run graph
We call the forward method and retrieve the result with the “Prediction 2D” method.
This method returns two variables, the first one is the layer information (cluster composed of the layer name, the graph index and the shape of the output layer) and the second one is the prediction with a shape of [batch_size, units] (Dense output shape).
1 – Generate a set of data
We generate two array of data of type single and shape1 [batch_size = 10, input_dim = 5] and shape2 [batch_size = 10, input_dim = 15] (different input shape).
2 – Define graph
We first define two input layers named input_dense1 and input_dense2. This layers is setup as an input array shaped [input_dim = 5] and [input_dim = 15].
In order to have same output shape for added dense layers we define for both of these the same “units” parameter (units = 5) (refer Dense layer add to graph documentation for more details).
Then we build an array of the two graphs generated by the dense layers and inject it into the input of the Concatenate layer.
3 – Summarize graph
Returns the summary of the model in file text.
4 – Run graph
We call the forward method and retrieve the result with the “Prediction 2D” method.
This method returns two variables, the first one is the layer information (cluster composed of the layer name, the graph index and the shape of the output layer) and the second one is the prediction with a shape of [batch_size, units] (Dense output shape).



