%% Create 3-D Global Average Pooling Layer
% Create a 3-D global average pooling layer with the name 'gap1'.

layer = globalAveragePooling3dLayer('Name','gap1')

% Include a 3-D global average pooling layer in a Layer array.

layers = [ ...
    image3dInputLayer([28 28 28 3])
    convolution3dLayer(5,20)
    reluLayer
    globalAveragePooling3dLayer
    fullyConnectedLayer(10)
    softmaxLayer
    classificationLayer]

% Copyright 2019 The MathWorks, Inc.