Gated Recurrent Unit
Compare a compact gated recurrent unit with RNN and LSTM on its own focused page.
GRU keeps gating compact with update and reset mechanisms while remaining genuinely trainable in the browser.
Step by step
- Calculate update gate.
- Calculate reset gate.
- Build candidate state.
- Blend old and candidate hidden states.
- Predict from the final hidden state.
- Backpropagate through both gates and shared recurrence.
Core formulas
GRU update
hₜ = (1−zₜ)nₜ + zₜhₜ₋₁The update gate blends new and remembered information.
When to use Gated Recurrent Unit
- Comparing recurrent gating mechanisms.