What is the “dilemma of fixed-size input” for CNNs? How is it typically resolved?
Answer
The dilemma of fixed-size input is the constraint that classic CNN classifiers (VGG, early ResNets) only accept images of one predetermined resolution: the fully connected head has a weight matrix whose input dimension equals the flattened feature-map size, and that size is only constant if every input image has the same . Real-world images arrive in arbitrary sizes, so they must be resized or cropped first, distorting aspect ratios, discarding small objects, or cutting content away.
(1) The FC Head Is the Bottleneck: Convolutions themselves handle any spatial size; only the flatten + FC stage pins the input dimensions.
(2) Preprocessing Costs Information: Resizing squishes content and can erase small objects; cropping keeps resolution but discards everything outside the window.
(3) Structural Fixes Exist: Replace or decouple the FC head (GAP, fully convolutional designs, or adaptive pooling) and the network accepts variable sizes natively.

Figure 1: Both standard fixes hurt: downsampling erases small objects; cropping amputates anything near the border.
Mathematical Formulation (Why the FC Head Fixes the Size):
Where:
is the final feature volume;
flattens it to
values, so
exists only for one specific
.
averages channel
over all spatial positions, yielding a
-dimensional vector for any input size.
Common Solutions: (1) Global Average Pooling: replace the flatten with a per-channel average, so the classifier sees exactly values regardless of resolution; (2) Fully Convolutional Networks: remove FC layers entirely and let the output scale with the input (standard for segmentation); (3) Adaptive Pooling: pool to a fixed
grid no matter the input size (e.g.,
nn.AdaptiveAvgPool2d in PyTorch).

Figure 2: Three structural escapes (GAP, FCN, and adaptive pooling) all remove the fixed-size constraint at its source: the FC head.
Leave a Reply