Code

Fully Convolutional Network Initialization

In a Fully Convolutional Network (FCN), different layers require specific initialization strategies to optimally support spatial predictions. The transposed convolutional layer, which is responsible for upsampling the feature maps back to the original input image size, is initialized using the upsampling of bilinear interpolation (e.g., via a bilinear kernel). Conversely, the 1×11 \times 1 convolutional layer, which transforms the number of channels to correspond to the target classes, is initialized using Xavier initialization.

# PyTorch W = bilinear_kernel(num_classes, num_classes, 64) net.transpose_conv.weight.data.copy_(W)
# MXNet W = bilinear_kernel(num_classes, num_classes, 64) net[-1].initialize(init.Constant(W)) net[-2].initialize(init=init.Xavier())

0

1

Updated 2026-05-21

Contributors are:

Who are from:

Tags

D2L

Dive into Deep Learning @ D2L