Given the single-channel input and filter with bias , stride 1 and no padding, what is the output after cross-correlation, ReLU activation and max pooling with stride 1?
Deep learning, Convolutional networks
Level L2 Elementary. Length Medium. Nature Mat Mathematical.
What's being asked
Whether you can execute a 2-D convolution (cross-correlation), ReLU and max pooling accurately by hand.
Key idea
Slide the filter over every patch of without padding to get a feature map , clamp negative values to zero with , and take the maximum over each window.
Steps
- Find the convolution output size: with input , kernel , padding and stride , the height and width are , giving a map .
- Compute the 9 patch dot products with . Top row: ; ; . Middle row: ; ; . Bottom row: ; ; . So .
- Apply element-wise: .
- Apply max pooling with stride 1 (output size ): top-left , top-right , bottom-left , bottom-right . The final output is .
Common mistakes
- Flipping the kernel horizontally and vertically (mathematical convolution) when deep-learning frameworks perform cross-correlation as stated.
- Skipping ReLU altogether (which leaves negative entries in the intermediate map and alters the final output whenever a pooling window is all-negative), or using stride 2 instead of stride 1 for the pooling step.
How long your answer should be
Half a page; 3–4 minutes.
Last checked on 4 December 2026.
Read this
Previous in Deep learning: Why do convolutional neural networks suit image data better than fully connected MLPs, and what is the difference between translation equivariance and translation invariance?
Next in Deep learning: An activation tensor of shape passes through a convolutional layer with 64 filters (including biases). What are the output shape, the number of learnable parameters and the multiply-accumulate (MAC) count, and why do architectures such as Inception and ResNet use convolutions?