AI / ML VisualizerRuns in your browser · No API keyOpen Model
← All topics

Sequence Models

GRU

Change reset and update behavior in a gated recurrent unit.

GRU · unrolled through timeGRU · unrolled through timex1 = 1t=1h=0.2059x2 = 0t=2h=0.1314x3 = -1t=3h=-0.3987x4 = 0.5t=4h=-0.1001x5 = 0t=5h=-0.0619Shared weights · h(t−1) → cell → h(t)
Step 0 / 4
GRU update, reset, candidate, hidden · 1 × 4
h = (1−z) × candidate + z × previous; candidate = tanh(Wx + U(r × previous) + b)(1−0.69)×0.664 + 0.69×0 = 0.2059

LSTM separates cell memory from hidden output and has three gates. GRU combines memory with hidden state and uses two gates. Neither is universally better.

Memory over timeMemory over time0-21-1203142Hidden

No account required. Local images and model files stay in your browser. Educational models demonstrate mechanisms; they are not production predictors.