The LSTM layer is added with LSTM(units, input_shape=(timesteps, features)). model.add(LSTM(128, input_shape=(timesteps, features))) matches this syntax.
Step 2: Check other options for correctness
model.add(Dense(128, input_shape=(timesteps, features))) is a Dense layer, not LSTM. model.add(Conv2D(128, kernel_size=3)) is a Conv2D layer for images. model.add(Embedding(128, input_shape=(timesteps, features))) is an Embedding layer, not LSTM.
Final Answer:
model.add(LSTM(128, input_shape=(timesteps, features))) -> Option A
Quick Check:
LSTM layer syntax = D [OK]
Quick Trick:LSTM layer uses LSTM(), not Dense or Conv2D [OK]
Common Mistakes:
MISTAKES
Using Dense instead of LSTM for sequence data
Confusing Embedding with LSTM layer
Applying Conv2D for text input
Master "Sequence Models for NLP" in NLP
9 interactive learning modes - each teaches the same concept differently