Upsampling
Upsampling is a process that increases the number, density, or spatial or temporal resolution of samples or values in a dataset or representation by adding, duplicating, or estimating them.
Natural Language Processing in Action, Second Edition
Oversampling the minority class increases the representation of underrepresented classes in training data, often by duplicating or resampling examples.
- How it is used
- Balances nationality frequencies so an RNN treats common and underrepresented names more equally during training.
- How deep it goes
- Defines duplication as a brute-force balancing method and demonstrates its dataset effect, but does not detail alternative resampling algorithms.
- Examples
- Uses Arabic surnames including repeated Abadi and Zogby entries within a 37-nationality dataset.
- What you can do after
- Apply it via duplicated or balanced surname samples before training a nationality-prediction RNN.
Read how Natural Language Processing in Action, Second Edition explains upsampling →
Evolutionary Deep Learning: Genetic algorithms and neural networks
An upsampling layer increases the spatial resolution of an intermediate feature representation, typically without learning a convolutional filter.
- How it is used
- Reconstructs full-resolution images from compressed latent views in convolutional autoencoders.
- How deep it goes
- Explains UpSampling as pooling’s opposite and demonstrates repeated 2× resizing, without detailing resizing internals.
- Examples
- Uses a 28×28×1 Fashion-MNIST autoencoder decoder with three UpSampling2D((2, 2)) stages.
- What you can do after
- Apply it via Keras by pairing UpSampling2D with convolutional layers in an autoencoder decoder.
Read how Evolutionary Deep Learning: Genetic algorithms and neural networks explains upsampling →
Grokking AI Algorithms, Second Edition
Upsampling is the process of increasing the spatial resolution of a structured representation such as an image or feature map.
- How it is used
- Uses upsampling in a U-Net decoder to enlarge compressed feature maps during image reconstruction.
- How deep it goes
- Explains pixel duplication, learned patch projection, overlap addition, and a NumPy-style implementation, without covering training details.
- Examples
- Uses 4×4-to-8×8 feature maps, pixel duplication, an artist analogy, diagrams, and transposed-convolution pseudocode.
- What you can do after
- Build it from scratch using array operations for transposed convolution and connect the resulting maps to decoder reconstruction.
Read how Grokking AI Algorithms, Second Edition explains upsampling →
Deep Learning with R, Third Edition
Upsampling is the expansion of a representation's spatial resolution by generating or restoring values at additional spatial locations.
- How it is used
- Restores spatial resolution for pixel-level segmentation and denoising models after convolutional downsampling.
- How deep it goes
- Explains learned transposed convolutions, tensor shapes, mirrored U-Net stages, and skip connections without deriving their internal arithmetic.
- Examples
- Uses a 200 × 200 segmentation output, a 100-to-50-to-100 shape reversal, and a 128 × 128 U-Net denoising architecture.
- What you can do after
- Build it from scratch with R/Keras Conv2DTranspose layers and mirrored U-Net blocks for segmentation or denoising.
Read how Deep Learning with R, Third Edition explains upsampling →
Related concepts
- SMOTEincludes · SMOTE is an oversampling technique that generates synthetic examples for a minority class by interpolating between existing minority-class examples and their nearest neighbors.
- Conv2DTransposeimplemented by · Conv2DTranspose is a neural-network layer that applies a learned two-dimensional transposed convolution to increase the spatial resolution of feature maps.
- class imbalanceaddressed by · Class imbalance is a condition in a classification dataset where classes have substantially unequal numbers of examples.
- transposed convolutionimplemented by · A transposed convolution is a learnable convolution-like operation corresponding to the transpose of a convolution operator and often used to increase spatial resolution.
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.



