Model Optimization Interview Q&A
1/10: Loss Function
Q: What is a loss function and why is it important?
A: Quantifies the difference between predicted and actual values. Guides training.
Examples: MSE (regression), Cross-Entropy (classification)
2/10: Learning Rate
Q: How does learning rate affect training?
A: Controls weight updates.
Too high: Overshooting.
Too low: Slow convergence.
Solution: Schedules, Adam optimizer.
3/10: Overfitting
Q: What is overfitting and how to prevent it?
A: Model learns noise, performs poorly on unseen data.
Prevention: Regularization, Dropout, Early Stopping, Cross-Validation, Data Augmentation.
4/10: Dropout
Q: Explain Dropout.
A: Randomly disables neurons during training to prevent co-adaptation and reduce overfitting.
Rate: 0.2-0.5.
5/10: Batch Normalization
Q: What is Batch Normalization and why is it useful?
A: Normalizes inputs to each layer, stabilizing training.
Benefits: Reduces internal covariate shift, higher learning rates, regularization.
6/10: Optimizer Choice
Q: How to choose the right optimizer?
A: Depends on problem.
SGD: Simple, large datasets.
Adam: Adaptive, faster.
RMSprop: Recurrent networks.
Start with Adam!
7/10: Vanishing/Exploding Gradients
Q: What are vanishing/exploding gradients?
A: During backpropagation in deep networks.
Vanishing: Gradients shrink.
Exploding: Gradients grow uncontrollably.
Solutions: ReLU, gradient clipping, weight initialization.
8/10: Transfer Learning
Q: How does Transfer Learning help?
A: Uses pre-trained models to reduce training time and improve performance.
Fine-tune last layers.
Common in NLP (BERT), CV (ResNet, VGG).
9/10: Early Stopping
Q: What is Early Stopping?
A: Halts training when validation performance stops improving, preventing overfitting.
Monitor validation loss.
10/10: Generalization Evaluation
Q: How to evaluate model generalization?
A: Use unseen test data, cross-validation. Metrics: Accuracy, Precision, Recall, F1-score.
Generalization gap: Training vs. test performance.
Explanation of Formatting Choices:
• Numbered List: Clearly separates each question and answer.
• Q&A Format: Simple and direct.
• Concise Language: Shortened answers to fit within character limits and maintain readability on mobile devices.
• Keywords/Bullet Points: Uses bullet points for lists to improve clarity.
• Key Examples: Includes important examples for understanding.
• Sequential: Keeps the logical flow of the original text.
Post #2020
4.71K
- ❤ 7