Practice
1. In the context of LSTM networks, which component is primarily responsible for deciding what information to keep or discard from the cell state?
easy
Solution
Step 1: Identify the role of each gate in LSTM.
The forget gate determines what information to discard from the cell state.Step 2: Eliminate wrong options.
The input gate decides what new information to store, the output gate decides what to output, and the activation function is not a gate.Final Answer:
Option A -> Option AQuick Check:
Forget gate discards info in LSTM. [OK]
Hint: Forget gate discards info in LSTM. [OK]
Common Mistakes:
2. A neural network with dropout is not improving validation accuracy despite training for many epochs. What is a likely cause?
medium
Solution
Step 1: Analyze dropout impact
High dropout rates can lead to underfitting as too many neurons are deactivated.Step 2: Eliminate wrong options
The dropout rate is too low, causing overfitting. is incorrect because low dropout rates do not cause underfitting. The learning rate is too high, causing instability. is incorrect because learning rate issues would cause erratic training, not just poor validation accuracy. The batch size is too small, causing noisy gradients. is incorrect because small batch sizes affect convergence speed, not dropout effectiveness.Final Answer:
Option A -> Option AQuick Check:
High dropout can underfit. [OK]
Hint: High dropout can underfit. [OK]
Common Mistakes:
3. A model trained with Adam optimizer is not converging. What is the most likely cause?
medium
Solution
Step 1: Identify common issues with Adam.
Adam can be sensitive to high learning rates, causing divergence.Step 2: Eliminate less likely causes.
Adam handles non-convex problems well, and batch size/weight decay are less likely to cause non-convergence.Final Answer:
Option B -> Option BQuick Check:
High lr can cause Adam to diverge. [check]
Hint: High lr can cause Adam to diverge. [check]
Common Mistakes:
4. You are designing a transformer model for a language translation task. Which normalization technique would you choose and why?
hard
Solution
Step 1: Consider the architecture of transformers.
Transformers process sequences and often use self-attention mechanisms, where Layer Normalization is more effective.Step 2: Evaluate the benefits of Layer Normalization.
Layer Normalization normalizes across features, which is beneficial for the attention mechanism in transformers.Final Answer:
Option A -> Option AQuick Check:
Layer Norm fits transformers' self-attention. [OK]
Hint: Layer Norm fits transformers' self-attention. [OK]
Common Mistakes:
5. In a fraud detection system, you need to balance precision and recall. Which metric would you choose and why?
hard
Solution
Step 1: Understand the need for balance.
Fraud detection requires a balance between catching frauds and minimizing false alarms.Step 2: Choose the metric that balances precision and recall.
F1 Score is the harmonic mean of precision and recall, providing a balance.Final Answer:
Option A -> Option AQuick Check:
F1 Score balances precision and recall. [OK]
Hint: F1 Score balances precision and recall. [OK]
Common Mistakes:
