Skip to Content

Convolutional Neural Network CNN: How to Calculate Padding for “Same” Convolution in CNNs with 7×7 Filters?

Learn how to calculate padding for “same” convolution in CNNs when using a 7×7 filter, stride of 1, and an input volume of 63x63x16. Detailed explanation provided.

Table of Contents

Question

You have an input volume that is 63x63x16, and convolve it with 32 filters that are each 7×7, and stride of 1. You want to use a “same” convolution. What is the padding?

A. 1
B. 2
C. 3
D. 7

Answer

C. 3

Explanation

In a “same” convolution:

The goal is to maintain the same spatial dimensions (height and width) of the output as the input.

To achieve this, padding is added around the input image so that after applying the convolution operation, no reduction in size occurs.

Input size: 63×63,
Filter size: 7×7,
Stride: 1.

The calculated padding ensures that the output remains 63×63.

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.