Skip to Content

Convolutional Neural Network CNN: What Are the Dimensions of a 31x31x32 Input Volume After Padding with “pad=1”?

Learn how to calculate the dimensions of a 31x31x32 input volume after applying padding of 1 in Convolutional Neural Networks (CNNs).

Table of Contents

Question

You have an input volume that is 31x31x32, and pad it using “pad=1”. What is the dimension of the resulting volume (after padding)?

A. 32x32x32
B. 31x31x34
C. 33x33x33
D. 33x33x32

Answer

D. 33x33x32

Explanation

In Convolutional Neural Networks (CNNs), padding is used to add extra layers of zeros around the spatial dimensions (height and width) of an input volume. This helps preserve spatial dimensions or control the output size during convolution operations.

Given:

  • Input volume dimensions: 31×31×32 (Height H, Width W, Depth D)
  • Padding: pad=1

Padding increases the height and width by 2×pad, while the depth remains unchanged.

Formula:

New Height=H+2×pad
New Width=W+2×pad
New Depth=D

Calculation:

  1. Height: 31+2×1=33
  2. Width: 31+2×1=33
  3. Depth: 32 (unchanged)

Thus, the resulting volume dimensions are: 33×33×32

Why Other Options Are Incorrect:

A. 32x32x32: Incorrect because height and width should increase by 2×pad=2, not just by 1.
B. 31x31x34: Incorrect because padding does not affect depth.
C. 33x33x33: Incorrect because depth remains unchanged at 32.

Convolutional Neural Network CNN: What Are the Dimensions of a 31x31x32 Input Volume After Padding with "pad=1"?

If the padding is 1 you add 2 to the height dimension and 2 to the width dimension.

Convolutional Neural Network CNN certification exam assessment practice question and answer (Q&A) dump including multiple choice questions (MCQ) and objective type questions, with detail explanation and reference available free, helpful to pass the Convolutional Neural Network CNN exam and earn Convolutional Neural Network CNN certification.