Transposed convolution

Convolution · node type · ConvTranspose

A learned upsampler: each input value paints a weighted copy of the kernel into a larger output.

Also called Deconvolution, ConvTranspose, Fractionally strided conv

Figure 1. Transposed convolution inside Generate a tiny image, a real model in WeightSpace. The 4 outlined nodes are Transposed convolution; select any node for its shapes and parameters.

What it does

A transposed convolution runs the bookkeeping of a strided convolution in reverse. Each input value multiplies the whole kernel and adds the result into the output at a position spaced by the stride, and overlapping contributions are summed. With stride 2 the output is about twice as tall and wide as the input. Generators use it to grow a small feature map into an image, and decoders use it to restore resolution. When kernel size and stride do not divide evenly, overlaps are uneven and can leave checkerboard patterns, which is why many newer models resize first and then apply a normal convolution instead.

Formula

Y[m, s·y + i, s·x + j] += Σc X[c, y, x] · W[c, m, i, j]H' = s·(H − 1) + k − 2p + outputpadding

Shapes and parameters

Shapes
Input [N, C, H, W], kernel [C, M/group, kH, kW], bias [M]; output [N, M, H', W'] with H' ≈ stride × H.
Parameters
C × (M / group) × kH × kW weights plus M biases. A 4 × 4 transposed convolution from 128 to 64 channels has 128 × 64 × 16 + 64 = 131,136 parameters.
Used for
GAN and VAE generators, the upsampling half of segmentation networks, and super-resolution models.

Figure 2. The typed ports of Transposed convolution, in the same format as every model drawing. Letters such as N or C stand for any size.

In WeightSpace

Read-only in WeightSpace today. Image generators in the catalog are edited through the bias of their final color layer, after the upsampling path.