3.4.1 · D5Convolutional Neural Networks
Question bank — Convolution operation and filters
This page is a set of conceptual traps for Convolution operation and filters. No heavy arithmetic here — every item targets a misunderstanding or a boundary case. Read the question, commit to an answer out loud, THEN reveal.
Prerequisite ideas lean on 2.2.05-Receptive-fields, 3.3.01-Backpropagation, and connect forward to 3.4.02-Pooling-layers, 3.4.03-CNN-architectures, 3.4.06-Batch-normalization, 3.4.10-Depthwise-separable-convolutions, and 4.1.03-Transfer-learning.
True or false — justify
Deep-learning "convolution" flips the kernel before sliding it.
False — it is really cross-correlation (no flip). Since the weights are learned by 3.3.01-Backpropagation, a flipped kernel would just be learned in flipped form, so the flip is irrelevant.
A convolution layer has fewer parameters than a fully connected layer on the same image.
True — one small filter (e.g. weights) is reused at every position, whereas a fully connected neuron needs one weight per input pixel. This is parameter sharing.
Two stacked convolutions can see as much of the image as one convolution.
True — stacking grows the receptive field: two layers cover a region while using fewer weights ( vs ) and adding a nonlinearity in between. See 2.2.05-Receptive-fields.
Padding with zeros changes the values of the interior output pixels.
False — interior positions never touch the padded border, so their sums are unchanged. Padding only adds new output positions near the edges and preserves output size.
Increasing the number of filters increases the spatial height and width of the output.
False — the number of filters sets the output depth (channel count), not or . Height/width are fixed by , , , .
A stride of 2 always roughly halves both output dimensions.
True in effect — , and dividing by approximately halves the count (up to floor and border effects).
Convolution is a linear operation.
True — it is a weighted sum, so it is linear in the input. The nonlinearity in a CNN comes from the activation (e.g. ReLU) applied after the convolution, not from convolution itself.
Applying the same filter at two different image locations can give different outputs.
True — the output depends on the local patch, so identical filters produce different scores where the underlying pixels differ. What is shared is the filter weights, not the results.
Spot the error
"I'll use a filter on my RGB image."
The filter must match input depth: it has to be . A bare filter has no channel dimension to multiply the 3 input channels against.
"Padding always keeps output size equal to input size."
Only for . Size preservation needs with stride 1; a filter needs , and any shrinks the output regardless of padding.
"Stride 2 means I skip every other element inside the filter."
That is dilation, not stride. Stride moves the whole filter by 2 positions across the input; dilation inserts gaps between filter taps, enlarging the receptive field without adding weights.
"A dilated-by-2 filter still only covers a region."
Dilation 2 spreads the 9 taps over a footprint (gaps of one pixel between taps), so it sees while keeping only 9 weights.
"Output depth equals input depth, since the filter spans all input channels."
Output depth equals the number of filters. Each filter collapses all input channels into one feature map; filters give output channels.
"With the output height is ."
You must apply the floor: . The output height is 2, and the last column of input is simply never reached by a valid window.
"A large negative convolution output means the pattern is absent."
Absence corresponds to a value near zero. A large negative value means the pattern's opposite/contrast is present (e.g. a bright-left/dark-right edge for a right-bright edge detector).
"Since convolution sums many products, its output is always positive."
Filter weights can be negative (edge detectors have taps), so sums are freely positive, negative, or zero.
Why questions
Why do we sum across channels rather than keep them separate in a multi-channel convolution?
A single filter is meant to detect one combined pattern (e.g. "red high, blue low"). Summing the per-channel contributions fuses the color information into one match score, producing one output feature map per filter.
Why does convolution give translation invariance but a fully connected layer does not?
The same filter slides everywhere, so a feature learned in one location is automatically detected in all locations. A fully connected layer assigns a separate weight to each pixel, so it must relearn the feature at every position.
Why do early CNN layers tend to learn edges while deeper layers learn object parts?
Deeper layers build on the outputs of earlier ones, so their effective receptive field is larger and their inputs are already-abstract features — composing edges into textures into parts. See 2.2.05-Receptive-fields and 3.4.03-CNN-architectures.
Why do we use padding at all instead of just letting the image shrink?
Without padding, each layer removes pixels per dimension, so deep networks would erode the image and starve the corners of representation. Padding preserves spatial size and gives border pixels a fair number of windows.
Why can a filter's weights be learned instead of hand-designed?
Because the convolution output feeds a differentiable loss, 3.3.01-Backpropagation can compute how each weight should change to reduce error — the filters that best predict the data emerge automatically.
Why is stride sometimes used instead of a separate pooling layer?
Strided convolution downsamples while it convolves, saving a step and letting the downsampling itself be learned. Compare with fixed 3.4.02-Pooling-layers, which downsample with no learnable weights.
Why does splitting a filter into depthwise + pointwise parts save computation?
A standard filter mixes space and channels at once; separating them (3.4.10-Depthwise-separable-convolutions) does spatial filtering per channel first, then a cheap channel mix, cutting multiply–adds dramatically.
Edge cases
What does a convolution do spatially?
Nothing spatially — it looks at one pixel across all channels and outputs a learned linear combination of channels. It is a per-pixel channel mixer, used to change depth cheaply.
What happens at to the output height and width?
They stay equal to the input: . A filter always preserves spatial size.
What if the filter is exactly the size of the input (, , )?
The output is a single number (): the filter fits in exactly one position. This behaves like one fully connected neuron over the whole patch.
What if (filter larger than input) with no padding?
No valid window exists, giving output height — an empty/invalid output. You must add padding or use a smaller kernel.
What is the output if every filter weight is zero?
Every output is exactly zero everywhere, regardless of input — the filter detects nothing. This is why weight initialization avoids all-zeros: 3.3.01-Backpropagation gradients would also be symmetric and stuck.
What happens to output size when is negative?
The floor makes , meaning the padded input is still too small for even one window; the configuration is invalid and must be fixed with more padding or a smaller kernel/stride.
At the image corner with zero-padding, how many real (non-padded) pixels does the filter multiply?
Only the overlapping interior fraction — for a filter with at the true corner, just of the 9 taps hit real pixels; the rest multiply zeros and contribute nothing.