How does a transposed convolution upsample a feature map (give its output size formula for input size n, kernel k, stride s and padding p), and why does it often create checkerboard artefacts when k is not divisible by s?

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 k×k kernel and stamps (adds) those weighted kernels onto the output grid at stride s. Its output size is nout=(n−1)s−2p+k, and when s does not divide k, different output pixels receive contributions from different numbers of kernels.

Steps

  1. Explain the mechanics: each scalar input pixel scales a k×k kernel, and adjacent input steps shift that kernel by s output pixels, summing overlapping regions (equivalently, inserting s−1 zeros between input pixels, padding by k−1−p for p<k, and running a stride-1 convolution).
  2. Give the output formula: for input size n, stride s, padding p and kernel k (with zero output padding), nout=(n−1)s−2p+k (for example, n=4,k=4,s=2,p=1 gives 3⋅2−2+4=8, exact 2× upsampling).
  3. Explain checkerboard artefacts: when k is not a multiple of s (such as k=3,s=2), 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.
  4. State the fix: choose k divisible by s (such as k=4,s=2), or replace transposed convolution with nearest-neighbour or bilinear upsampling followed by a standard stride-1 convolution.

Common mistakes

How long your answer should be

4–5 sentences; about 2 minutes.

Read this

Previous in Deep learning: A single-channel 3×3 input X=[102210031] is cross-correlated (no padding, stride 1, no bias) with a 2×2 kernel W, giving output Y. Given upstream loss gradient ∂L∂Y=[1−120], what is ∂L∂W, and how is ∂L∂X computed in general?
Next in Deep learning: A ResNet bottleneck block maps 256 channels to 256 channels via a 1×1 conv (to 64), a 3×3 conv (at 64) and a 1×1 conv (to 256), ignoring biases. How many parameters and MACs per spatial position does it use compared with a basic block of two 3×3 convs at 256 channels, and how does the same 1×1 idea cut the cost of a 5×5 Inception branch (192→32 channels via 16 bottleneck channels)?