%% Create and Connect Depth Concatenation Layer
% Create a depth concatenation layer with two inputs and the name 'concat_1'.
%

concat = depthConcatenationLayer(2,'Name','concat_1')

%
% Create two ReLU layers and connect them to the depth concatenation layer. The depth concatenation layer concatenates the outputs from the ReLU layers.

relu_1 = reluLayer('Name','relu_1');
relu_2 = reluLayer('Name','relu_2');

lgraph = layerGraph;
lgraph = addLayers(lgraph,relu_1);
lgraph = addLayers(lgraph,relu_2);
lgraph = addLayers(lgraph,concat);

lgraph = connectLayers(lgraph,'relu_1','concat_1/in1');
lgraph = connectLayers(lgraph,'relu_2','concat_1/in2');

plot(lgraph)

% Copyright 2012 The MathWorks, Inc.