Skip to content
← All PyTorch tracks

Recurrent Networks

PyTorch

RNN, LSTM, GRU, bidirectional — the architectures that ruled NLP before transformers.

6 exercises

Explore freely. Sign in to keep your progress.

Your learning sequence

  1. 1 Not solved yet. RNN Sequence Forward Pass Practice · Medium
  2. 2 Not solved yet. LSTM Sequence Forward Pass Practice · Medium
  3. 3 Not solved yet. GRU Sequence Forward Pass Practice · Medium
  4. 4 Not solved yet. Bidirectional RNN Practice · Medium
  5. 5 Not solved yet. Sequence Classifier Practice · Medium
  6. 6 Not solved yet. One RNN Language-Model Training Step Practice · Hard

Check yourself

4 questions · not saved while you're signed out

Use these questions to check your understanding and compare explanations. Your score does not affect track completion.

0 / 4 correct

In a scalar recurrence whose local derivative is the same positive value w at every step, what does a starting gradient of 1 become after 20 steps?

Choose one answer to reveal the explanations. Answers are kept only while this page is open.

for w in [0.5, 1.0, 1.5]:
    gradient = 1.0
    for _ in range(20):
        gradient *= w
    print(f"w={w:.1f}: {gradient:.6g}")
Question 1 of 4