liveBook · Manning

Teacher forcing

Teacher forcing is a sequence-model training technique that supplies the ground-truth preceding output as input when predicting the next output.

How 2 Manning books explain it

Inside Deep Learning: Math, Algorithms, Models

A training approach for sequence decoders that feeds the true previous token as the next input instead of the model's own prediction.

How it is used
Trains Seq2Seq decoders by supplying the correct previous token during decoding.
How deep it goes
Explains the input swap, its training benefit, and the training-versus-evaluation control flow in code.
Examples
Uses a decoder-step figure and a forward-pass code path that selects the next decoder input.
What you can do after
Apply it to train sequence decoders that learn faster while still supporting autoregressive prediction later.

Read how Inside Deep Learning: Math, Algorithms, Models explains teacher forcing →

Graph Neural Networks in Action

Teacher forcing is a sequential-model training technique that supplies the ground-truth previous output as input when predicting the next step.

How it is used
Trains sequential graph decoders while controlling whether each step receives ground-truth data or its preceding prediction.
How deep it goes
Explains the input-switching behavior and shows its decoder implementation, but does not discuss scheduling strategies or quantitative trade-offs.
Examples
Demonstrates teacher forcing with pose-graph frames and contrasts training-time ground-truth inputs with multi-step prediction using teacher_forcing=False.
What you can do after
Apply it via a PyTorch decoder’s teacher_forcing flag to train with real frames and forecast future graphs autoregressively.

Read how Graph Neural Networks in Action explains teacher forcing →

Related concepts

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.