What it does
A GRU keeps a single hidden state. An update gate z blends the previous state with a new candidate, and a reset gate r decides how much of the previous state the candidate may look at. When z stays near one, the old state passes through untouched, which gives the GRU long memory with fewer parameters than an LSTM. It is common in streaming audio models, where each step must be cheap.
Formula
zt = σ(Wz xt + Rz ht−1 + bz), rt = σ(Wr xt + Rr ht−1 + br)ĥt = tanh(Wh xt + Rh (rt ⊙ ht−1) + bh)ht = (1 − zt) ⊙ ĥt + zt ⊙ ht−1Shapes and parameters
- Shapes
- Input [T, N, I]; hidden state [D, N, H]; output of every step [T, D, N, H].
- Parameters
- 3H × (I + H) weights plus 6H biases per direction in ONNX. With I = 64 and H = 64: 24,576 + 384 = 24,960.
- Used for
- Streaming speech enhancement (GTCRN), keyword spotting, and small sequence models on devices.
In WeightSpace
Read-only in WeightSpace today. The speech enhancement model in the catalog is edited at a normalization bias in its decoder, after its recurrent layers.