GRU Cell Forward Pass

medium
Unit 11 · Embeddings0/1 to milestone

The GRU is a lighter alternative to the LSTM, with two gates and no separate cell state. With input xx, previous state hh, WW of shape (D, 3H), UU of shape (H, 3H) and bb of shape (3H,), split into r, z, n parts in that order:

Pro problem

Unlock this and every premium problem across all tracks — plus hidden-test grading, advanced AI engineering modules and new content every week.

Start 7-day free trial
solution.py · Python 3.13
Run your code to see results. ⌘↵ to run · ⌘⇧↵ to submit
GRU Cell Forward Pass · TechGradify