Study the paper
Deep Residual Learning for Image Recognition
Lessons, visuals, quizzes, flashcards, and resources—organized in teaching order.
Dimension Matching and Projection Shortcuts
Zero-Padding vs. Projection Shortcuts
Zero-Padding vs. Projection Shortcuts
Dimension Matching in Shortcut Connections
Sources
S4.SS1.p9.1
Identity vs. Projection Shortcuts. We have shown that parameter-free, identity shortcuts help with training. Next we investigate projection shortcuts (Eqn.(2)). In Table 3 we compare three options: (A) zero-padding shortcuts are used for increasing dimensions, and all shortcuts are parameter-free (the same as Table 2 and Fig. 4 right); (B) projection shortcuts are used for increasing dimensions, and other shortcuts are identity; and (C) all shortcuts are projections.
When the input and output dimensions of a residual block do not match, we must adjust the dimensions of the shortcut connection. Two main strategies are compared:
- Option A (Zero-padding): Parameter-free shortcuts where extra dimensions are padded with zeros. This introduces no extra parameters but means no residual learning occurs in the padded dimensions.
- Option B (Projection shortcuts): A projection matrix is applied to match dimensions via a convolution, as shown in the formulation:
Sources
S4.SS1.p9.1
Identity vs. Projection Shortcuts. We have shown that parameter-free, identity shortcuts help with training. Next we investigate projection shortcuts (Eqn.(2)). In Table 3 we compare three options: (A) zero-padding shortcuts are used for increasing dimensions, and all shortcuts are parameter-free (the same as Table 2 and Fig. 4 right); (B) projection shortcuts are used for increasing dimensions, and other shortcuts are identity; and (C) all shortcuts are projections.
S4.SS1.p10.1
Table 3 shows that all three options are considerably better than the plain counterpart. B is slightly better than A. We argue that this is because the zero-padded dimensions in A indeed have no residual learning. C is marginally better than B, and we attribute this to the extra parameters introduced by many (thirteen) projection shortcuts. But the small differences among A/B/C indicate that projection shortcuts are not essential for addressing the degradation problem. So we do not use option C in the rest of this paper, to reduce memory/time complexity and model sizes. Identity shortcuts are particularly important for not increasing the complexity of the bottleneck architectures that are introduced below.
Deep dive
Empirical results show that Option B performs slightly better than Option A because the zero-padded dimensions in Option A do not benefit from residual learning. However, the difference is marginal, indicating that projection shortcuts are not essential for addressing the degradation problem itself.
Sources
S4.SS1.p10.1
Table 3 shows that all three options are considerably better than the plain counterpart. B is slightly better than A. We argue that this is because the zero-padded dimensions in A indeed have no residual learning. C is marginally better than B, and we attribute this to the extra parameters introduced by many (thirteen) projection shortcuts. But the small differences among A/B/C indicate that projection shortcuts are not essential for addressing the degradation problem. So we do not use option C in the rest of this paper, to reduce memory/time complexity and model sizes. Identity shortcuts are particularly important for not increasing the complexity of the bottleneck architectures that are introduced below.