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?
Deep learning, Convolutional networks
Level L2 Elementary. Length Short. Nature Mat Mathematical.
What's being asked
Whether you understand a convolution as a shared per-pixel linear projection across channels and can count its parameters and MACs.
Key idea
At every spatial position , a convolution takes the -dimensional channel vector and multiplies it by a weight matrix plus bias. Spatial dimensions stay unchanged, while the channel depth changes from to .
Steps
- Output shape: kernel size is with stride 1 and no padding needed, so spatial size stays and the 64 filters give shape .
- Parameters: each filter has weights and bias, so learnable parameters.
- MACs (one multiply-accumulate per weight application): positions input channels output channels MACs (a conv with the same channels would cost the MACs and nearly the parameters: parameters and MACs).
- Purpose: convolutions act as cheap channel bottlenecks (reducing channels down to before an expensive or convolution, or expanding channels afterwards) while adding non-linearity when followed by ReLU.
Common mistakes
- Thinking a convolution is pointless because spatial multiplication looks like scaling by a constant; it mixes across all input channels.
- Forgetting the bias term in the parameter count, or counting biases in the MAC count (biases are additions, not multiply-accumulates).
How long your answer should be
4–5 lines; 2 minutes.
Last checked on 4 December 2026.
Read this
Previous in Deep learning: 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?
Next in Deep learning: A small CNN takes a image through: (1) a conv with 16 filters, stride 1, padding 1; (2) max pooling, stride 2; (3) a conv with 32 filters, stride 1, padding 1; (4) global average pooling; and (5) a 10-class linear head. Including biases, what are the output shape after each layer and the total parameter count, and why does global average pooling avoid a parameter explosion?