liveBook · Manning

Upsampling

As explained in 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.

Upsampling increases the spatial resolution of a feature representation. In a convolutional autoencoder, it reverses the encoder’s pooling-driven reduction so the decoder can rebuild a full image. section 8.1.2

A decoder typically uses upsampling in a repeated convolutional sequence:

  • Apply a convolution to the latent or intermediate representation. section 8.1.2
  • Apply UpSampling2D((2, 2)) to double the spatial dimensions. section 8.1.2
  • Repeat the convolution-and-upsampling pattern until the original resolution is restored, then use a final convolution to produce the output channels. section 8.1.2

Autoencoder decoder

A 28×28 grayscale autoencoder can decode its latent view with Conv2D layers of 16, 32, and 64 filters, each followed by UpSampling2D((2, 2)), then produce one output channel with a final Conv2D layer. section 8.1.2

Listing 8.2 EDL_8_1_AE.ipynb: The decoder
decoded_layer1 = layers.Conv2D(16, (3, 3), activation='relu', 
 padding='same')(latent_view)                                               #1
decoded_layer1 = layers.UpSampling2D((2, 2))
 (decoded_layer1)                                                           #2
decoded_layer2 = layers.Conv2D(32, (3, 3), 
 activation='relu', padding='same')(decoded_layer1)                         #1
decoded_layer2 = layers.UpSampling2D((2, 2))
 (decoded_layer2)                                                           #2
decoded_layer3 = layers.Conv2D(64, (3, 3), activation='relu')(decoded_layer2) #1
decoded_layer3 = layers.UpSampling2D((2, 2))
 (decoded_layer3)                                                           #2
 
output_layer   = layers.Conv2D(1, (3, 3), 
 padding='same')(decoded_layer3)                                            #3

Inspect the executable Keras decoder pattern, including convolution, UpSampling2D, and final output-layer construction. section 8.1.2

How Evolutionary Deep Learning: Genetic algorithms and neural networks covers it

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 it assumes
Builds from max pooling and latent representations to explain how decoders restore reduced spatial dimensions.
What you can do after
Apply it via Keras by pairing UpSampling2D with convolutional layers in an autoencoder decoder.
How it connects
Connects upsampling with convolution, max pooling, encoder-decoder architecture, latent representation, and neuroevolution.

Also explained in

Compare how 4 books explain upsampling →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Evolutionary Deep Learning: Genetic algorithms and neural networks. The section links point to the parts of the book it draws on.