How does a transposed convolution upsample a feature map (give its output size formula for input size , kernel , stride and padding ), and why does it often create checkerboard artefacts when is not divisible by ?
Deep learning, Convolutional networks
Level L3 Intermediate. Length Short. Nature Th+Mat Both.
What's being asked
Whether you understand transposed convolution as the adjoint of strided convolution and can explain uneven overlap.
Key idea
A transposed convolution multiplies each input pixel by the entire kernel and stamps (adds) those weighted kernels onto the output grid at stride . Its output size is , and when does not divide , different output pixels receive contributions from different numbers of kernels.
Steps
- Explain the mechanics: each scalar input pixel scales a kernel, and adjacent input steps shift that kernel by output pixels, summing overlapping regions (equivalently, inserting zeros between input pixels, padding by for , and running a stride-1 convolution).
- Give the output formula: for input size , stride , padding and kernel (with zero output padding), (for example, gives , exact upsampling).
- Explain checkerboard artefacts: when is not a multiple of (such as ), some output positions lie under two overlapping kernels while neighbours lie under only one. Even with near-constant weights, the output alternates high and low magnitude in a 2-D grid.
- State the fix: choose divisible by (such as ), or replace transposed convolution with nearest-neighbour or bilinear upsampling followed by a standard stride-1 convolution.
Common mistakes
- Calling transposed convolution "deconvolution", which mathematically means inverting a convolution in frequency space rather than learning an upsampling transpose.
- Forgetting that stride enlarges the output here whereas it shrinks the output in a standard convolution.
How long your answer should be
4–5 sentences; about 2 minutes.
Read this
Previous in Deep learning: A single-channel input is cross-correlated (no padding, stride 1, no bias) with a kernel , giving output . Given upstream loss gradient , what is , and how is computed in general?
Next in Deep learning: A ResNet bottleneck block maps 256 channels to 256 channels via a conv (to 64), a conv (at 64) and a conv (to 256), ignoring biases. How many parameters and MACs per spatial position does it use compared with a basic block of two convs at 256 channels, and how does the same idea cut the cost of a Inception branch ( channels via 16 bottleneck channels)?