0
0
Computer Visionml~20 mins

Pre-trained models (ResNet, VGG, EfficientNet) in Computer Vision - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Pre-trained Model Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding the main advantage of using pre-trained models

Why do we often use pre-trained models like ResNet, VGG, or EfficientNet instead of training a model from scratch?

AThey always require more data and time to train than new models.
BThey allow faster training and better performance by using knowledge from large datasets.
CThey are simpler models with fewer layers, so easier to understand.
DThey only work for black and white images, not color images.
Attempts:
2 left
💡 Hint

Think about how learning from previous experience helps you solve new problems faster.

Predict Output
intermediate
2:00remaining
Output shape after passing an image through a pre-trained ResNet

Given a batch of 8 RGB images of size 224x224 passed through a pre-trained ResNet50 model (without the final classification layer), what is the shape of the output tensor?

Computer Vision
import torch
import torchvision.models as models

model = models.resnet50(pretrained=True)
model = torch.nn.Sequential(*list(model.children())[:-1])  # Remove final layer

input_tensor = torch.randn(8, 3, 224, 224)
output = model(input_tensor)
output_shape = output.shape
A(8, 512, 7, 7)
B(8, 1000)
C(8, 3, 224, 224)
D(8, 2048, 1, 1)
Attempts:
2 left
💡 Hint

Check the last convolutional layer output channels and spatial dimensions after pooling.

Model Choice
advanced
2:00remaining
Choosing the best pre-trained model for mobile deployment

You want to deploy an image classification model on a mobile device with limited memory and processing power. Which pre-trained model is the best choice?

AResNet50 - medium size but heavier than EfficientNet
BVGG19 - very deep and large model
CEfficientNet - balances accuracy and efficiency
DResNet152 - very deep with many layers
Attempts:
2 left
💡 Hint

Think about models designed for efficiency and smaller size.

Hyperparameter
advanced
2:00remaining
Adjusting learning rate when fine-tuning a pre-trained model

When fine-tuning a pre-trained VGG16 model on a new dataset, which learning rate strategy is most appropriate?

AUse a very low learning rate (e.g., 0.0001) to avoid destroying learned features
BUse a very high learning rate (e.g., 0.1) to speed up training
CUse the same learning rate as training from scratch (e.g., 0.01)
DUse no learning rate because the model is pre-trained
Attempts:
2 left
💡 Hint

Think about how big changes affect already learned knowledge.

Metrics
expert
2:00remaining
Interpreting accuracy differences between pre-trained models

You fine-tune ResNet50 and EfficientNet-B0 on the same dataset. ResNet50 achieves 85% accuracy, EfficientNet-B0 achieves 88%. What is the most likely reason for this difference?

AEfficientNet-B0 has a better architecture that balances depth, width, and resolution.
BResNet50 was trained with a higher learning rate causing overfitting.
CEfficientNet-B0 uses fewer parameters, so it always performs better.
DResNet50 is older and cannot learn new datasets.
Attempts:
2 left
💡 Hint

Consider model design principles and efficiency.