GRU
A gated recurrent unit (GRU) is a recurrent neural-network architecture that uses learned gates to regulate information flow and update a hidden state across sequence steps.
Build AI Drug Discovery Pipelines
A gated recurrent unit is a recurrent neural-network unit that uses learned gates to control information retained and propagated across sequence steps.
- How it is used
- Uses GRUs to retain sequence context when encoding and generating molecular SMILES strings.
- How deep it goes
- Explains gate computations and cell costs, then implements GRU-based encoder and decoder components in a molecular variational autoencoder.
- Examples
- Uses benzene ring closure and a molecular encoder-decoder that reconstructs SMILES from sampled latent vectors.
- What you can do after
- Apply it via PyTorch to encode and decode molecular sequences in a variational autoencoder.
Inside Deep Learning: Math, Algorithms, Models
A gated recurrent neural network architecture that updates a hidden state over sequence steps with reset and update gates.
- How it is used
- Uses GRUs for next-character prediction and as sequence-to-sequence encoders and decoders.
- How deep it goes
- Works through PyTorch GRU and GRUCell integration and manual hidden-state updates, but does not derive GRU gate equations.
- Examples
- Builds a character-level predictor and an attention-based encoder-decoder, then proposes comparing GRU and LSTM training times.
- What you can do after
- Apply it via PyTorch nn.GRU and nn.GRUCell to assemble sequence models and choose between whole-sequence and stepwise processing.
Read how Inside Deep Learning: Math, Algorithms, Models explains GRU →
Graph Neural Networks in Action
A recurrent neural-network architecture that uses reset and update gates to control information flow through its recurrent state.
- How it is used
- Uses GRUs to carry temporal information in sensor-trajectory prediction and a graph-aware pose decoder.
- How deep it goes
- Explains gate roles and implements both a PyTorch GRU model and a custom decoder cell, without deriving GRU internals mathematically.
- Examples
- Shows a pose-estimation model using `nn.GRU` and a custom cell that incorporates edge-type-weighted messages.
- What you can do after
- Build it from scratch as a custom node-and-edge decoder cell, or apply it via PyTorch `nn.GRU` for sequence prediction.
Deep Learning with Python, Third Edition
A recurrent neural network unit designed to process sequences with gated state updates.
- How it is used
- Uses GRUs to model temporal sequences for forecasting, character prediction, generation, and translation.
- How deep it goes
- Demonstrates layer stacking, sequence outputs, and explicit state passing without deriving the GRU’s internal gates.
- Examples
- Uses Jena temperature forecasting and a character-level Shakespeare language model to demonstrate GRU layers.
- What you can do after
- Apply it via Keras to stack recurrent layers and pass state explicitly during autoregressive generation.
Read how Deep Learning with Python, Third Edition explains GRU →
Deep Learning with R, Third Edition
A gated recurrent unit (GRU) is a recurrent neural-network architecture that models sequence dependencies with update and reset mechanisms.
- How it is used
- Uses GRUs for ordered sequence modeling, including temperature forecasting and next-character prediction.
- How deep it goes
- Explains layer configuration, stacking, dropout, and evaluation with examples, without deriving GRU gate internals.
- Examples
- Demonstrates a stacked GRU on Jena temperature data and a single GRU predicting characters in Shakespeare.
- What you can do after
- Apply it via R/Keras to configure, train, and evaluate recurrent models for forecasting and character prediction.
Natural Language Processing in Action, Second Edition
A gated recurrent unit (GRU) is a recurrent neural-network architecture that uses reset and update gates to control information flow and hidden-state updates.
- How it is used
- Uses gated recurrence to preserve useful information when ordinary RNNs lose influence from early tokens.
- How deep it goes
- Explains gate intuition, learned thresholds, recurrent structure and reset/update calculations down to implementation expressions.
- Examples
- Uses PyTorch WikiText2 language modeling, masked `<unk>` tokens, parameter loading and prompted word generation.
- What you can do after
- Apply it via PyTorch by selecting a GRU language model, loading parameters and generating text from a prompt.
Read how Natural Language Processing in Action, Second Edition explains GRU →
Sutskever's List
A gated recurrent unit is a recurrent neural-network unit that uses learned gates to regulate state updates.
- How it is used
- Deploys GRUs as encoder and decoder units for attention-based neural machine translation.
- How deep it goes
- Explains bidirectional encoding and decoder inputs but stops short of detailing individual gate equations.
- Examples
- Uses bidirectional sentence encoding, a 1,000-unit decoder, and WMT English–French translation results.
- What you can do after
- Evaluate how GRU-based encoder-decoder systems support translation with attention and handle longer sentences.
Machines that Think
A recurrent neural network architecture that uses gates to control the retention and updating of sequence information.
- How it is used
- Models ordered information by selectively carrying context across sequence steps.
- How deep it goes
- Explains learned gating and contrasts GRUs with LSTMs and basic recurrent networks, without detailing individual GRU gates.
- Examples
- Illustrates long-range context with a sentence connecting “the book” to “was fascinating.”
- What you can do after
- Evaluate GRUs as sequence models by weighing selective memory against sequential processing and state compression.
Grokking Machine Learning
A gated recurrent unit is a recurrent neural-network unit that uses gates to control the retention and update of sequence state.
- How it is used
- Applies gated recurrent architectures to language-processing tasks involving written or spoken sequences.
- How deep it goes
- Defines GRUs as advanced recurrent architectures but stops short of explaining their gate equations or internal update procedure.
- Examples
- Uses sentiment analysis, machine translation, speech recognition, text summarization, and topic-specific chatbots as application examples.
Vibe Engineering
A gated recurrent unit is a recurrent neural-network architecture that uses gating mechanisms to control information flow through a sequence.
- How it is used
- Processes word sequences inside a deep-learning classification pipeline before a sigmoid output.
- How deep it goes
- Explains sequential reading and context retention at the architecture level.
- Examples
- Uses nausea and vomiting embeddings and drug-description classification as concrete sequence-processing examples.
- What you can do after
- Evaluate/understand how a GRU fits into a text-classification data flow.
Also covered in
- Build an Advanced RAG Application (From Scratch)In early access (MEAP)
- Grokking Machine Learning, Second EditionIn early access (MEAP)
What to know first
- LSTMA long short-term memory (LSTM) network is a recurrent neural-network architecture with gated memory cells that control information flow and model dependencies in sequential data.
- recurrent neural networkA recurrent neural network is a neural network that processes ordered inputs while carrying and updating an internal state across successive steps.
- accuracyAccuracy is the degree to which a result agrees with a specified truth, reference, or criterion, commonly measured as the proportion of evaluated predictions that are correct.
- language modelA language model is a computational model that represents patterns in linguistic sequences to assign probabilities, predict, generate, or evaluate language.
Related concepts
- gated updatehas part · A gated update is a state or representation update in which learned gates control how new information is combined with or replaces existing information.
- reset gatehas part · A reset gate is a GRU mechanism that controls how much of the previous hidden state contributes to computing a candidate state.
- LSTMalternative to · A long short-term memory (LSTM) network is a recurrent neural-network architecture with gated memory cells that control information flow and model dependencies in sequential data.
- recurrent neural networkaddresses · A recurrent neural network is a neural network that processes ordered inputs while carrying and updating an internal state across successive steps.
- vanishing gradient problemaddresses · The vanishing-gradient problem is a neural-network training difficulty in which gradients shrink during backpropagation until parameter updates in earlier layers or steps become ineffective.
- bidirectional rnncontrasts with · A bidirectional recurrent neural network processes a sequence in forward and reverse directions and combines the resulting representations.
Questions about GRU
What is GRU?
A gated recurrent unit (GRU) is a recurrent neural-network architecture that uses learned gates to regulate information flow and update a hidden state across sequence steps.
Which Manning books explain GRU?
Build AI Drug Discovery Pipelines, Inside Deep Learning: Math, Algorithms, Models, Graph Neural Networks in Action, Deep Learning with Python, Third Edition, Deep Learning with R, Third Edition, Natural Language Processing in Action, Second Edition, Sutskever's List, Machines that Think and 2 more.
What should I know before learning GRU?
Manning books that teach GRU usually introduce LSTM, recurrent neural network, accuracy and language model first.
What is the difference between GRU and LSTM?
A gated recurrent unit (GRU) is a recurrent neural-network architecture that uses learned gates to regulate information flow and update a hidden state across sequence steps. A long short-term memory (LSTM) network is a recurrent neural-network architecture with gated memory cells that control information flow and model dependencies in sequential data.
What are the parts of GRU?
GRU includes gated update and reset gate.
What is GRU also called?
GRU is also called gated recurrent unit or GRUs.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.









