Practice
1. In a deep learning model, when is it more appropriate to use Layer Normalization instead of Batch Normalization?
easy
Solution
Step 1: Understand the context of normalization techniques.
Batch Normalization relies on batch statistics, which can be unstable with small batch sizes. Layer Normalization uses layer statistics, making it more stable for small batches or online learning.Step 2: Eliminate wrong options.
When the model is trained on a very large batch size. is incorrect because large batch sizes are suitable for Batch Normalization. When the model has a very deep architecture. is incorrect because depth doesn't directly affect the choice between these normalizations. When the model is trained on a balanced dataset. is irrelevant to normalization choice.Final Answer:
Option B -> Option BQuick Check:
Layer Norm for small batches or online learning. [OK]
Hint: Layer Norm for small batches or online learning. [OK]
Common Mistakes:
2. Given the following Python code snippet for a segmentation task, what will be the output shape if the input image shape is (256, 256, 3) and the model outputs a segmentation map with 10 classes?
import numpy as np
input_image = np.random.rand(256, 256, 3)
model_output = np.random.rand(256, 256, 10)easy
Solution
Step 1: Understand the model output
The model outputs a segmentation map with a shape corresponding to the input spatial dimensions and the number of classes.Step 2: Eliminate wrong options
(256, 256, 3) is the input shape, (256, 256, 1) implies binary segmentation, and (256, 256) lacks class dimension.Final Answer:
Option A -> Option AQuick Check:
Output shape = Input spatial + class channels [OK]
Hint: Output shape = Input spatial + class channels [OK]
Common Mistakes:
3. In logistic regression, what does the decision boundary represent?
easy
Solution
Step 1: Understand the decision boundary.
The decision boundary in logistic regression is where the predicted probability is 0.5, indicating equal likelihood of either class.Step 2: Eliminate wrong options.
The point where the model's accuracy is maximized. is incorrect because accuracy is not directly related to the decision boundary. The line that separates the data into two equal parts. is incorrect as it describes a median, not a decision boundary. The point where the loss function is minimized. is incorrect because the loss function is minimized during training, not at the decision boundary.Final Answer:
Option D -> Option DQuick Check:
Decision boundary = probability 0.5 [OK]
Hint: Decision boundary = probability 0.5 [OK]
Common Mistakes:
4. In the context of the No Free Lunch Theorem, which statement is true about model performance across different datasets?
easy
Solution
Step 1: Understand the No Free Lunch Theorem
The theorem states that no single model is universally best across all datasets.Step 2: Eliminate wrong options
A model that performs well on one dataset will perform well on all datasets. is incorrect because model performance varies by dataset. The best model for a dataset can be determined without testing. is incorrect because testing is necessary to determine the best model. A complex model always outperforms a simple model. is incorrect because complexity does not guarantee better performance.Final Answer:
Option B -> Option BQuick Check:
No universal best model. [OK]
Hint: No universal best model. [OK]
Common Mistakes:
5. How would you adapt K-Means to handle a dataset with categorical features?
hard
Solution
Step 1: Understand K-Means limitations
K-Means is not suitable for categorical data as it relies on Euclidean distance.Step 2: Choose the right adaptation
K-Modes is designed for clustering categorical data, making it the best choice.Final Answer:
Option B -> Option BQuick Check:
K-Modes for categorical data [OK]
Hint: K-Modes for categorical data [OK]
Common Mistakes:
