RNN / LSTM Visualizer

Explore how recurrent networks pass hidden state through time steps.

Vanilla RNN· Unfolded
5 stepshidden size: 4
12 params
t = 0x00.10h00.050.060.070.08y00.54t = 1x10.80h10.400.470.540.60y10.76t = 2x20.30h20.280.350.420.48y20.71t = 3x30.90h30.510.600.680.75y30.82t = 4x40.20h40.290.350.420.49y40.72activeprocessedpending

Vanilla RNN

RNN

How it works

At each time step, the RNN takes an input xₜ and produces a hidden state hₜ using the previous hidden state hₜ₋₁. The hidden state acts as a "memory" that carries information forward through the sequence.

Architecture

TypeElman RNN
Sequence Length5
Hidden Size4
Parameters12

hₜ = tanh(Wih · xₜ + Whh · hₜ₋₁ + bh)