0
0
Computer Visionml~20 mins

CNN architecture review in Computer Vision - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
CNN Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Convolutional Layer Output Size

Given an input image of size 64x64 with 3 color channels, a convolutional layer uses 16 filters of size 3x3, stride 1, and padding 1. What will be the output shape of this convolutional layer?

A(62, 62, 16)
B(66, 66, 16)
C(64, 64, 16)
D(64, 64, 3)
Attempts:
2 left
💡 Hint

Remember that padding of 1 keeps the spatial dimensions the same when stride is 1.

Predict Output
intermediate
2:00remaining
Output Shape After Max Pooling

What is the output shape after applying a 2x2 max pooling layer with stride 2 on an input tensor of shape (32, 32, 10)?

A(16, 16, 10)
B(15, 15, 10)
C(31, 31, 10)
D(32, 32, 10)
Attempts:
2 left
💡 Hint

Max pooling reduces spatial dimensions by the stride when filter size equals stride.

Hyperparameter
advanced
2:00remaining
Choosing Kernel Size for Edge Detection

You want to design a CNN layer to detect edges in images. Which kernel size is most appropriate for this task?

A3x3 kernel
B1x1 kernel
C7x7 kernel
D15x15 kernel
Attempts:
2 left
💡 Hint

Edge detection usually requires small kernels to capture local gradients.

Metrics
advanced
2:00remaining
Interpreting CNN Training Accuracy

A CNN model training on image classification shows training accuracy of 98% but validation accuracy of 75%. What is the most likely explanation?

AThe model is underfitting the training data
BThe model is overfitting the training data
CThe validation data is corrupted
DThe training data is too small
Attempts:
2 left
💡 Hint

High training accuracy but low validation accuracy usually means the model memorizes training data.

🔧 Debug
expert
3:00remaining
Identifying Error in CNN Layer Definition

Consider this PyTorch CNN layer definition:

nn.Conv2d(in_channels=3, out_channels=32, kernel_size=3, stride=2, padding=2)

What is the output size for an input image of size 64x64? Is there an error in the output size calculation?

AOutput size is 64x64; stride 2 has no effect
BOutput size is 32x32; padding is correct for stride 2
COutput size is 31x31; padding is too small causing output to shrink
DOutput size is 33x33; padding is too large causing output to be bigger than expected
Attempts:
2 left
💡 Hint

Use the formula: ((Input - Kernel + 2*Padding) / Stride) + 1