Learn Before
Concept
Transposed Convolution Configuration for FCN Upsampling
To restore the spatial dimensions of feature maps to the original input image size in a Fully Convolutional Network (FCN), a transposed convolutional layer is employed. If the spatial dimensions need to be increased by a factor of , the transposed convolution is configured with a stride of . To achieve the exact original dimensions, the padding is set to (assuming is an integer), and the height and width of the convolution kernel are set to . For instance, to upscale a feature map by times, the stride is , the padding is , and the kernel size is .
# PyTorch net.add_module('transpose_conv', nn.ConvTranspose2d(num_classes, num_classes, kernel_size=64, padding=16, stride=32))
# MXNet net.add(nn.Conv2DTranspose(num_classes, kernel_size=64, padding=16, strides=32))
0
1
Updated 2026-05-21
Tags
D2L
Dive into Deep Learning @ D2L