%% Create Convolutional Layer That Fully Covers Input
% Suppose the size of the input is 28-by-28-by-1. Create a convolutional layer with 16 filters, each with a height of 6 and a width of 4. Set the horizontal and vertical stride to 4.
% Make sure the convolution covers the input completely. For the convolution to fully cover the input, both the horizontal and vertical output dimensions must be integer numbers. For the horizontal output dimension to be an integer, one row of padding is required on the top and bottom of the image: (28 – 6+ 2 * 1)/4 + 1 = 7. For the vertical output dimension to be an integer, no zero padding is required: (28 – 4+ 2 * 0)/4 + 1 = 7.
% Construct the convolutional layer.

layer = convolution2dLayer([6 4],16,'Stride',4,'Padding',[1 0])

% Copyright 2012 The MathWorks, Inc.