What does a 2-D convolutional layer compute at each output position?
Show the answer and explanation
Correct answer: C, The dot product of a small learned kernel with the input patch beneath it, summed over channels, plus a bias.
Explanation CNN
A convolutional layer slides a small learned kernel (say 3×3×C_in) over the input. At each position it multiplies the kernel element-wise with the patch underneath, sums over the kernel's height, width and all input channels, and adds a bias. The result is one value of the output feature map; repeating this at every position builds the whole map.
Why the other descriptions are wrong:
- Taking the largest value in the window is max pooling, which has no learned weights.
- A fixed, equal-weight average is average pooling, again with nothing learned.
- One separate weight per input pixel is a fully connected layer; a conv layer reuses the same small kernel everywhere and only looks at a local patch.
Strictly speaking, deep-learning libraries implement cross-correlation (the kernel is not flipped), but since the kernel is learned this makes no practical difference and everyone calls it convolution.
Interview tip: describe it as "slide, multiply, sum, add bias" and mention that one kernel produces one output channel.