%% Create 3-D Average Pooling Layer
% Create a 3-D average pooling layer with nonoverlapping pooling regions that downsamples by a factor of 2.

layer = averagePooling3dLayer(2,'Stride',2)

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

layers = [ ...
    image3dInputLayer([28 28 28 3])
    convolution3dLayer(5,20)
    reluLayer
    averagePooling3dLayer(2,'Stride',2)
    fullyConnectedLayer(10)
    softmaxLayer
    classificationLayer]

% Copyright 2018 The MathWorks, Inc.