Data Science & ML

CNN & Image Classification

Convolutions, pooling, architectures (VGG, ResNet), transfer learning, data augmentation, fine-tuning

24 interview questionsยท
Senior
1

What is a convolution operation in a CNN?

Answer

A convolution is a mathematical operation that applies a filter (kernel) over an image by sliding this filter across the input and computing the dot product at each position. This allows extracting local features such as edges, textures, or patterns. Unlike dense networks where each neuron is connected to all inputs, convolution exploits the spatial structure of images by sharing filter weights across the entire image.

2

What is the role of stride in a convolution layer?

Answer

Stride defines the step size when moving the filter across the image. A stride of 1 moves the filter by one pixel at each step, while a stride of 2 moves it by 2 pixels, thus reducing the output size. Increasing stride allows reducing the spatial dimension of the feature map and computational cost, but may also cause information loss if the stride is too large.

3

What is the purpose of padding in a convolution layer?

Answer

Padding consists of adding pixels (usually zeros) around the input image before applying convolution. This allows controlling the output size and preserving information at image edges. With 'same' padding, the output has the same size as input, while with 'valid' (no padding), the size decreases. Padding also prevents edge pixels from being underrepresented in feature maps.

4

What is the difference between Max Pooling and Average Pooling?

5

What is a feature map in a CNN?

+21 interview questions

Master Data Science & ML for your next interview

Access all questions, flashcards, technical tests, code review exercises and interview simulators.

Start for free