Concatenation Layer - Concatenation layer - Simulink (original) (raw)
Main Content
Concatenation layer
Since R2024b
Libraries:
Deep Learning Toolbox / Deep Learning Layers / Combination Layers
Description
The Concatenation Layer block takes inputs and concatenates them along a specified dimension. The inputs must have the same size in all dimensions except the concatenation dimension. This block accepts data that has dimensions corresponding to the format that you specify with the Data format block parameter.
The exportNetworkToSimulink function generates this block to represent a concatenationLayer object.
Ports
Input
First input to concatenate, provided as an array that follows the format that you specify with the Data format parameter.
Data Types: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
| fixed point
Second input to concatenate, provided as an array that follows the format that you specify with the Data format parameter.
Data Types: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
| fixed point
_N_th input to concatenate, provided as an array that follows the format that you specify with the Data format parameter. The block has a number of input ports equal to the value of theNumInputs
property of the object that you specify with theLayer parameter.
Data Types: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
| fixed point
Output
Concatenated output data. The output data has dimensions corresponding to the format that you specify with the Data format block parameter.
Data Types: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
| fixed point
Parameters
To edit block parameters interactively, use theProperty Inspector. From the Simulink® Toolstrip, on the Simulation tab, in thePrepare gallery, select Property Inspector.
Main
Specify the name of a workspace variable that contains aconcatenationLayer
object from a trained network. TheConcatenation Layer block configures itself by using the properties of the object.
Programmatic Use
Block Parameter: Layer |
---|
Type: workspace variable |
Values: concatenationLayer object |
Default: 'layerObject' |
Data format for the input data. The options use the same notation as the fmt argument of thedlarray
object, except layer blocks do not support the Batch (B
) dimension and instead assume an observation number of1
.
Programmatic Use
Block Parameter: DataFormat | |||
---|---|---|---|
Type: character vector | |||
Values: 'SSC' | 'C' | 'CT' | 'SC' | 'SSSC' |
Default: 'SSC' |
Execution
Specify the discrete interval between sample time hits or specify another type of sample time, such as continuous (0
) or inherited (-1
). For more options, see Types of Sample Time (Simulink).
By default, the block inherits its sample time based on the context of the block within the model.
Programmatic Use
To set the block parameter value programmatically, use the set_param (Simulink) function.
Parameter: SampleTime |
---|
Data Types: char |
Values: '-1' (default) | scalar |
Extended Capabilities
Version History
Introduced in R2024b
Starting in R2025a, the default value for the Layer parameter is 'layerObject'
. In previous versions, the default value is 'layer'
. If you have code that programmatically creates Simulink and relies on variables with the name 'layer'
, update your code so that the variable has the name 'layerObject'
.