CNN Basics Questions with Answers

23 practice questions on CNN Basics (AI & Machine Learning) with answers and step-by-step solutions. Try 10 samples below, then practise all 23 free in the AptiNest app.

Sample questions

Question 1Easy

Stride in a convolution is:

  1. The filter's step
  2. The number of filters
  3. The size of the image
  4. The learning rate

Answer: A. The filter's step

Explanation

A stride of 2 roughly halves the output size.

Step-by-step solution

  1. The filter moves across the input in steps.
  2. The stride is the step size in pixels.
  3. Stride 2 skips every other position and roughly halves the output size.

Why the other options are wrong

  • B. The number of filters sets output channels.
  • C. Image size is an input property.
  • D. The learning rate controls training updates.

Question 2Easy

In a CNN, a filter (kernel) is:

  1. A type of optimiser
  2. A small learned weight grid
  3. A data-cleaning step
  4. A list of class labels

Answer: B. A small learned weight grid

Explanation

Each filter detects a pattern such as an edge or texture.

Step-by-step solution

  1. A filter is a small grid of weights, e.g. 3 x 3.
  2. It slides over the input computing dot products.
  3. Its weights are learned during training.

Why the other options are wrong

  • A. Optimisers like Adam update weights.
  • C. Data cleaning happens before training.
  • D. Class labels are the targets.

Question 3Easy

How many trainable parameters does a max-pooling layer have?

  1. One per channel
  2. One per window
  3. Kernel size squared
  4. 0

Answer: D. 0

Explanation

Pooling applies a fixed operation (max or average) with nothing to learn.

Step-by-step solution

  1. Max pooling takes the largest value in each window.
  2. This is a fixed rule with nothing to learn.
  3. So it has 0 trainable parameters.

Why the other options are wrong

  • A. Pooling has no per-channel weights.
  • B. Windows do not carry learned values.
  • C. Kernel size is a fixed setting, not a set of weights.

Question 4Easy

Padding in a convolution layer means:

  1. Adding border pixels
  2. Removing edge pixels
  3. Changing image colours
  4. Adding more filters

Answer: A. Adding border pixels

Explanation

Padding controls output size and lets filters cover edges.

Step-by-step solution

  1. Convolution shrinks the output because filters cannot centre on border pixels.
  2. Padding adds extra pixels (usually zeros) around the border.
  3. This keeps size and gives edge pixels more influence.

Why the other options are wrong

  • B. Padding adds pixels; it does not remove them.
  • C. Colour is unchanged.
  • D. Filter count is unrelated to padding.

Question 5Medium

A 2 x 2 input patch [[1, 2], [3, 4]] is multiplied element-wise by the kernel [[1, 0], [0, -1]] and summed. What is the output value?

  1. 3
  2. 5
  3. -4
  4. -3

Answer: D. -3

Explanation

1 x 1 + 2 x 0 + 3 x 0 + 4 x (-1) = -3.

Step-by-step solution

  1. Element-wise products: 1 x 1 = 1, 2 x 0 = 0, 3 x 0 = 0, 4 x -1 = -4.
  2. Sum = 1 + 0 + 0 - 4.
  3. = -3.

Why the other options are wrong

  • A. 3 drops the minus sign.
  • B. 5 adds 1 and 4.
  • C. -4 forgets the top-left product.

Question 6Medium

A 1 x 1 convolution is commonly used to:

  1. Blur the image
  2. Double the spatial size
  3. Replace pooling layers
  4. Change channel count

Answer: D. Change channel count

Explanation

It mixes channels at each pixel, e.g. reducing 256 channels to 64 before an expensive 3 x 3 conv.

Step-by-step solution

  1. A 1 x 1 conv looks at one pixel position at a time.
  2. At each position it mixes all input channels into new channels.
  3. So it changes the channel count cheaply, e.g. 256 -> 64.

Why the other options are wrong

  • A. Blurring needs a larger averaging kernel.
  • B. 1 x 1 convs keep spatial size.
  • C. Pooling reduces spatial size; 1 x 1 convs work on channels.

Question 7Medium

A 26 x 26 feature map goes through 2 x 2 max pooling with stride 2. What is the output size?

  1. 24 x 24
  2. 26 x 26
  3. 12 x 12
  4. 13 x 13

Answer: D. 13 x 13

Explanation

Pooling with stride 2 halves each spatial dimension.

Step-by-step solution

  1. Pooling output = (N - K) / S + 1.
  2. = (26 - 2) / 2 + 1 = 12 + 1.
  3. = 13, so 13 x 13.

Why the other options are wrong

  • A. 24 x 24 subtracts 2 without dividing by the stride.
  • B. 26 x 26 ignores pooling.
  • C. 12 x 12 forgets the + 1.

Tip: 2 x 2, stride 2 pooling: halve the size.

Question 8Medium

With stride 1, what padding keeps the output size equal to the input for a 5 x 5 kernel?

  1. 2
  2. 1
  3. 0
  4. 5

Answer: A. 2

Explanation

For an odd kernel k, "same" padding is (k - 1)/2 = 2.

Step-by-step solution

  1. For stride 1: output = N - K + 2P + 1.
  2. Set output = N: -K + 2P + 1 = 0, so P = (K - 1) / 2.
  3. For K = 5: P = 2.

Why the other options are wrong

  • B. Padding 1 suits a 3 x 3 kernel.
  • C. Padding 0 shrinks the output by 4.
  • D. Padding 5 would make the output larger.

Tip: Same padding = (K - 1) / 2.

Question 9Hard

How many parameters does a conv layer with 64 filters of 5 x 5 on a 3-channel input have (with biases)?

  1. 4800
  2. 4864
  3. 75
  4. 1600

Answer: B. 4864

Explanation

(5 x 5 x 3 + 1) x 64 = 76 x 64 = 4864.

Step-by-step solution

  1. Weights per filter = 5 x 5 x 3 = 75.
  2. Plus 1 bias = 76 per filter.
  3. 64 x 76 = 4864.

Why the other options are wrong

  • A. 4800 forgets the 64 biases.
  • C. 75 is one filter's weights.
  • D. 1600 ignores the 3 input channels (5 x 5 x 64).

Question 10Hard

A 224 x 224 input goes through a 7 x 7 convolution with stride 2 and padding 3. What is the output height?

  1. 111
  2. 112
  3. 109
  4. 224

Answer: B. 112

Explanation

floor((224 + 2 x 3 - 7)/2) + 1 = floor(223/2) + 1 = 112.

Step-by-step solution

  1. Output = floor((N - K + 2P) / S) + 1.
  2. = floor((224 - 7 + 6) / 2) + 1 = floor(111.5) + 1.
  3. = 111 + 1 = 112.

Why the other options are wrong

  • A. 111 forgets the + 1.
  • C. 109 ignores the padding.
  • D. 224 ignores the stride.

Practise all 23 questions free

The full question bank with timed practice, progress tracking and Vidya, your AI tutor. Free, no ads.

Open this topic in the app →

Related topics

See all AI & Machine Learning topics · All topics