Deep Learning Convolutional Neural Networks 2 — Questions and Answers
Question 1: What is the effect of adding zero-padding to the input of a convolutional layer?
- Increases the number of filters
- Preserves spatial dimensions by adding zeros around the input border (Correct answer)
- Removes the need for pooling
- Increases the stride value
Correct answer: Preserves spatial dimensions by adding zeros around the input border
Zero-padding adds zeros around the input border so that the output feature map maintains the same spatial size as the input after convolution.
Question 2: In transfer learning with CNNs, what are the early layers of a pretrained model typically found to detect?
- High-level semantic concepts like faces
- Low-level features such as edges and textures (Correct answer)
- Only domain-specific patterns
- Class probability distributions
Correct answer: Low-level features such as edges and textures
Early CNN layers learn generic low-level features like edges, corners, and color gradients that are transferable across image recognition tasks.
Question 3: What is a depthwise separable convolution, as used in MobileNet?
- A convolution applied only to depth channels
- A factored convolution splitting spatial and channel mixing into separate steps to reduce computation (Correct answer)
- A 1×1 convolution reducing channel dimensions
- A strided convolution replacing pooling layers
Correct answer: A factored convolution splitting spatial and channel mixing into separate steps to reduce computation
Depthwise separable convolutions apply a single filter per input channel (depthwise) then combine channels with a 1×1 convolution (pointwise), greatly reducing FLOPs.
Question 4: What problem does the Inception module in GoogLeNet address?
- Vanishing gradients in shallow networks
- Choosing filter size by applying multiple filter sizes in parallel and concatenating outputs (Correct answer)
- Eliminating fully connected layers entirely
- Replacing activation functions with normalization
Correct answer: Choosing filter size by applying multiple filter sizes in parallel and concatenating outputs
The Inception module applies 1×1, 3×3, and 5×5 convolutions in parallel and concatenates results, allowing the network to capture multi-scale features automatically.
Question 5: What is the main purpose of 1×1 convolutions in deep CNN architectures?
- Increase spatial resolution
- Perform channel-wise linear combinations to reduce or expand depth cheaply (Correct answer)
- Apply spatial pooling
- Add non-linearity without changing spatial dimensions
Correct answer: Perform channel-wise linear combinations to reduce or expand depth cheaply
1×1 convolutions mix information across channels without affecting spatial dimensions, enabling dimensionality reduction (bottleneck) or expansion at low computational cost.
Question 6: Which layer type is typically used at the end of a CNN before the final classification head?
- Convolutional layer
- Global average pooling or flatten layer (Correct answer)
- Batch normalization layer
- Depthwise convolution layer
Correct answer: Global average pooling or flatten layer
Global average pooling or flattening collapses spatial dimensions into a fixed-size vector that can be fed into fully connected layers for classification.
What is the effect of adding zero-padding to the input of a convolutional layer?