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 ordered feed-forward submodules into reusable PyTorch models for training and inference.
- How deep it goes
- Defines ordered execution and module reuse, but stops short of architectures that require nonsequential computation.
- Examples
- Uses stacked Linear layers, MNIST classifiers, shared hidden layers, and convolutional residual blocks.
- What you can do after
- Build it from scratch: define ordered PyTorch models and insert reusable submodules into larger architectures.
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 →
Related concepts
- torch.nn.Moduleuses · torch.nn.Module is PyTorch’s base class for neural-network components that encapsulate computation, parameters, and submodules.
- residual connectionused by · A residual connection is a neural-network pathway that carries an earlier representation around one or more transformations to a later computation, where it can be combined with the transformed representation.
- recurrent neural networkuses · A recurrent neural network is a neural network that processes sequences by updating an internal state across successive inputs, allowing earlier inputs to influence later computations.
- linear layeruses · A linear layer is a neural-network layer that maps input features to outputs by a learned affine transformation, typically connecting each output to every input feature.
- feedforward networkimplements · A feedforward network is a neural network or subnetwork in which information flows from inputs toward outputs through successive computations without recurrent connections or cycles.
- language modelimplements · A language model is a computational model that represents patterns in linguistic tokens to estimate sequence probabilities and predict or generate language from context.
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.

