%% Create Group Normalization Layer
% Create a group normalization layer that normalizes incoming data across three groups of channels. Name the layer 'groupnorm'.

layer = groupNormalizationLayer(3,'Name','groupnorm')

% Include a group normalization layer in a Layer array. Normalize the incoming 20 channels in four groups.

layers = [
    imageInputLayer([28 28 3])
    convolution2dLayer(5,20)
    groupNormalizationLayer(4)
    reluLayer
    maxPooling2dLayer(2,'Stride',2)
    fullyConnectedLayer(10)
    softmaxLayer
    classificationLayer]

% Copyright 2020 The MathWorks, Inc.