depthConcatenationLayer

Depth concatenation layer

Description

A depth concatenation layer takes multiple inputs that have the same height and width and concatenates them along the third dimension (the channel dimension). The inputs have names 'in1','in2',...,'inN', where N is the number of inputs. Use the input names when connecting or disconnecting the layer to other layers using connectLayers or disconnectLayers.

Creation

Syntax

layer = depthConcatenationLayer(numInputs)
layer = depthConcatenationLayer(numInputs,'Name',Name)

Description

example

layer = depthConcatenationLayer(numInputs) creates a depth concatenation layer that concatenates numInputs inputs along the third (channel) dimension.

example

layer = depthConcatenationLayer(numInputs,'Name',Name) sets the Name property. To create a network containing a depth concatenation layer you must specify a layer name.

Properties

expand all

Layer name, specified as a character vector.

Data Types: char

Number of inputs to the layer, specified as a positive integer.

The inputs have names 'in1','in2',...,'inN', where N equals NumInputs. For example, if NumInputs equals 3, then the inputs have names 'in1','in2', and 'in3'. Use the input names when connecting or disconnecting the layer to other layers using connectLayers or disconnectLayers.

Examples

collapse all

Create a depth concatenation layer with two inputs and the name 'concat_1'.

layer = depthConcatenationLayer(2,'Name','concat_1')
layer = 
  DepthConcatenationLayer with properties:

         Name: 'concat_1'
    NumInputs: 2

Introduced in R2017b

Was this topic helpful?