Conv2DTranspose is a learned spatial upsampling layer used in a decoder to expand compact feature maps back toward an image. It serves as a more explicit reverse of convolution than combining Conv2D with UpSampling. section 8.5.2
A practical decoder construction uses it to:
- Double spatial dimensions with strides=2 while retaining same padding. section 8.5.2
- Reduce the number of filters after each decoder layer, reversing the encoder’s channel expansion. section 8.5.2
- Produce a final single-channel image through a sigmoid-activated Conv2DTranspose layer. section 8.5.2
VAE decoder
After a latent vector is projected with Dense and reshaped into encoder-sized feature maps, repeated Conv2DTranspose layers expand those maps and reduce their filters. A final layer creates the reconstructed image. section 8.5.2
Listing 8.26 EDL_8_5_VAE.ipynb: Building the decoder
for i in range(2):
x = Conv2DTranspose(filters=filters, #1
kernel_size=kernel_size,
activation='relu',
strides=2, #2
padding='same')(x)
filters //= 2 #3
outputs = Conv2DTranspose(filters=1, #4
kernel_size=kernel_size,
activation='sigmoid',
padding='same',
name='decoder_output')(x)
decoder = Model(latent_inputs, outputs, name='decoder') #5
decoder.summary()
Inspect the executable decoder definition, including strides, filter reduction, final output activation, and model assembly. section 8.5.2

