%% Create Global Max Pooling Layer
% Create a global max pooling layer with the name 'gmp1'.

layer = globalMaxPooling2dLayer('Name','gmp1')

% Include a global max pooling layer in a Layer array.

layers = [ ...
    imageInputLayer([28 28 1])
    convolution2dLayer(5,20)
    reluLayer
    globalMaxPooling2dLayer
    fullyConnectedLayer(10)
    softmaxLayer
    classificationLayer]

% Copyright 2019 The MathWorks, Inc.