Study the paper
Deep Residual Learning for Image Recognition
Lessons, visuals, quizzes, flashcards, and resourcesβorganized in teaching order.
Mathematical Formulation of Residual Learning
Residual Block with Identity Shortcut
Residual Block with Identity Shortcut
Source equation
This equation defines the fundamental residual block with an identity shortcut connection. The input vector is directly added to the output of the residual function, allowing gradients to flow unimpeded during backpropagation.
Sources
S3.E1
π²=β±β(π±,{Wi})+π±.π²β±π±subscriptπππ±\mathbf{y}=\mathcal{F}(\mathbf{x},\{W_{i}\})+\mathbf{x}. (1)
\mathbf{y}=\mathcal{F}(\mathbf{x},\{W_{i}\})+\mathbf{x}.Sources
S3.E1
π²=β±β(π±,{Wi})+π±.π²β±π±subscriptπππ±\mathbf{y}=\mathcal{F}(\mathbf{x},\{W_{i}\})+\mathbf{x}. (1)
\mathbf{y}=\mathcal{F}(\mathbf{x},\{W_{i}\})+\mathbf{x}.Deep dive
Let us perform a deterministic calculation to illustrate this identity mapping.
Assume a 2-dimensional input vector:
Suppose the residual mapping computes a simple linear transformation followed by a ReLU activation: where
First, compute the matrix-vector product:
Applying the element-wise ReLU activation:
Finally, add the identity shortcut connection :
Sources
S3.E1
π²=β±β(π±,{Wi})+π±.π²β±π±subscriptπππ±\mathbf{y}=\mathcal{F}(\mathbf{x},\{W_{i}\})+\mathbf{x}. (1)
\mathbf{y}=\mathcal{F}(\mathbf{x},\{W_{i}\})+\mathbf{x}.- Output vector of the residual block Β· [D]
- Input vector to the residual block Β· [D]
- Residual mapping function to be learned Β· Function
- Set of weight matrices associated with the layers in the block Β· Set of Matrices