Challenge - 5 Problems
Seq2Seq Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate1:30remaining
What is the main purpose of a sequence-to-sequence model?
In simple terms, what does a sequence-to-sequence model do?
Attempts:
2 left
💡 Hint
Think about tasks like language translation or summarizing text.
✗ Incorrect
Sequence-to-sequence models take a sequence as input and produce a sequence as output, useful for tasks like translation or speech recognition.
❓ Predict Output
intermediate2:00remaining
Output shape of encoder LSTM in a seq2seq model
Given the following TensorFlow code for an encoder LSTM, what is the shape of the output 'encoder_outputs'?
TensorFlow
import tensorflow as tf encoder_inputs = tf.keras.Input(shape=(None, 10)) encoder_lstm = tf.keras.layers.LSTM(16, return_sequences=True, return_state=True) encoder_outputs, state_h, state_c = encoder_lstm(encoder_inputs)
Attempts:
2 left
💡 Hint
return_sequences=True means output has one vector per input time step.
✗ Incorrect
With return_sequences=True, the output shape is (batch_size, timesteps, units). Here units=16 and timesteps is variable (None).
❓ Model Choice
advanced2:00remaining
Choosing the right decoder output activation for sequence generation
You are building a sequence-to-sequence model to generate text word-by-word from a vocabulary of 5000 words. Which decoder output activation function is most appropriate?
Attempts:
2 left
💡 Hint
Think about how to pick one word from many possible words at each step.
✗ Incorrect
Softmax outputs a probability distribution over all words, allowing selection of the most likely next word.
❓ Hyperparameter
advanced1:30remaining
Effect of increasing LSTM units in a seq2seq model
What is the most likely effect of increasing the number of units in the LSTM layers of a sequence-to-sequence model?
Attempts:
2 left
💡 Hint
More units mean more capacity but also more risk of memorizing training data.
✗ Incorrect
Increasing units increases model capacity, helping learn complex patterns but risking overfitting without enough data.
❓ Metrics
expert2:30remaining
Choosing the best metric for evaluating a seq2seq translation model
You trained a sequence-to-sequence model for language translation. Which metric best measures how close the model's output sentences are to the correct translations?
Attempts:
2 left
💡 Hint
Think about a metric that compares similarity of sentences rather than exact matches.
✗ Incorrect
BLEU score measures n-gram overlap, capturing partial matches and fluency in translation quality.