Sequential
Sequential is a PyTorch container module that applies child modules in a specified order to form a composite computation.
Inside Deep Learning: Math, Algorithms, Models
A PyTorch container module that applies a sequence of submodules in order.
- How it is used
- Organizes PyTorch submodules into ordered feed-forward models and groups sequence-compatible components inside larger networks.
- How deep it goes
- Explains ordered execution and layer reuse, while noting that some complex networks cannot be described entirely as feed-forward sequences.
- Examples
- Uses a two-linear-layer network, a shared hidden layer in an MNIST classifier, and a residual block’s transformation submodule.
- What you can do after
- Apply PyTorch’s `nn.Sequential` to assemble ordered layers and organize parts of larger models.
Read how Inside Deep Learning: Math, Algorithms, Models explains Sequential →
Deep Learning with PyTorch, Second Edition
A container module that groups child modules in order, forming a sequential network structure.
- How it is used
- Builds ordered feed-forward and convolutional networks from reusable PyTorch modules.
- How deep it goes
- Explains ordering, naming, parameter inspection, and visibility limits, but defers flexible architectures to custom nn.Module.
- Examples
- Uses named linear networks, parameter listings, gradient inspection, and convolutional pipelines that expose a reshaping problem.
- What you can do after
- Builds ordered PyTorch models, trains them, and inspects their named parameters and gradients.
Read how Deep Learning with PyTorch, Second Edition explains Sequential →
What to know first
- language modelA language model is a computational model that represents patterns in linguistic sequences to assign probabilities, predict, generate, or evaluate language.
- embeddingAn embedding is a numerical vector representation of an item in a feature space, encoding selected properties or relationships for computational tasks such as comparison or retrieval.
Related concepts
- torch.nn.Moduleuses · torch.nn.Module is PyTorch’s base class for neural-network components, providing an interface for computation and managing registered parameters and submodules.
- linear layeruses · A linear layer is a neural-network layer that applies a learned affine transformation to its input, typically using weights and a bias.
- recurrent neural networkuses · A recurrent neural network is a neural network that processes ordered inputs while carrying and updating an internal state across successive steps.
- residual connectionused by · A residual connection is a neural-network pathway that carries an earlier representation around one or more transformations so it can be combined with a later computation.
- feedforward networkimplements · A feedforward network is a neural network whose computations proceed from inputs toward outputs through directed connections without recurrent cycles or feedback.
- language modelimplements · A language model is a computational model that represents patterns in linguistic sequences to assign probabilities, predict, generate, or evaluate language.
Questions about Sequential
What is Sequential?
Sequential is a PyTorch container module that applies child modules in a specified order to form a composite computation.
Which Manning books explain Sequential?
Inside Deep Learning: Math, Algorithms, Models and Deep Learning with PyTorch, Second Edition.
What should I know before learning Sequential?
Manning books that teach Sequential usually introduce language model and embedding first.
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.

