Bird
0
0

You want to build an LSTM model to classify movie reviews as positive or negative. Which approach best improves model understanding of word meaning before LSTM processing?

hard📝 Application Q15 of 15
NLP - Sequence Models for NLP
You want to build an LSTM model to classify movie reviews as positive or negative. Which approach best improves model understanding of word meaning before LSTM processing?
AAdd an Embedding layer to convert words into dense vectors before the LSTM.
BUse a Dense layer directly on raw text input before LSTM.
CApply a Conv2D layer to the text input before LSTM.
DSkip preprocessing and feed raw text strings directly to LSTM.
Step-by-Step Solution
Solution:
  1. Step 1: Understand preprocessing for text in LSTM models

    Embedding layers convert words into meaningful numeric vectors, helping LSTM understand word relationships.
  2. Step 2: Evaluate other options

    Dense layers expect numeric input, not raw text. Conv2D is for images. Feeding raw strings to LSTM causes errors.
  3. Final Answer:

    Add an Embedding layer to convert words into dense vectors before the LSTM. -> Option A
  4. Quick Check:

    Embedding before LSTM = C [OK]
Quick Trick: Use Embedding layer to convert words before LSTM [OK]
Common Mistakes:
MISTAKES
  • Feeding raw text directly to LSTM
  • Using Dense or Conv2D layers on raw text
  • Skipping word vector conversion

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More NLP Quizzes