Intuition The One Big Idea
Instead of asking a stack of layers to compute the whole answer H ( x ) from scratch, we ask it to compute only the small correction F ( x ) we need to add to the input we already have — so the final answer is H ( x ) = F ( x ) + x . That little "+ x " is a wire that copies the input straight to the output, and it turns out to be the single trick that lets networks grow to 100+ layers without collapsing.
This page assumes nothing . Every letter, arrow, and word the parent note (3.4.09 ResNet and skip connections (Hinglish) is the Hinglish twin) throws at you is built here from the ground up, in an order where each idea rests on the one before it.
x
x is just a block of numbers flowing into a layer. In a convolutional network it has a shape written as C × H × W :
C = number of channels (how many feature maps stacked on top of each other),
H = height (rows of the grid),
W = width (columns of the grid).
So 64 × 56 × 56 means 64 separate 56 × 56 grids stacked like pages in a book.
Look at the figure: each pastel sheet is one channel , a 56 × 56 grid of numbers. The whole stack is one x . When the parent note writes "x is 64 × 56 × 56 ", it means exactly this book of 64 pages.
Why the topic needs it: everything ResNet does — convolutions, the skip wire, the addition — operates on these blocks. If you can't picture x as a stack of grids, the shape-matching later (128 × 28 × 28 vs 64 × 56 × 56 ) will feel like magic. It isn't.
H ( x )
A mapping H ( x ) is a rule: "give me a block x , I hand you back another block." H is the ideal thing we wish this part of the network computed. We don't know it — training tries to discover it.
F ( x )
The residual is the leftover: F ( x ) = H ( x ) − x . In words: "how much do I have to change x to turn it into the answer H ( x ) ?"
In the figure, x sits at a starting dot. The desired answer H ( x ) sits at another dot. The straight arrow x → H ( x ) is the whole journey . The short red arrow is F ( x ) — only the gap between where you already are and where you want to be.
Intuition Why "learn the gap"?
Reaching H ( x ) from nothing is like being asked to draw a face from a blank page. Learning F ( x ) is like being handed a photo that's 99% right and asked only for the final touch-up. If no change is needed at all, the network just has to output F ( x ) = 0 — the easiest thing a bunch of weights can do (push everything toward zero).
Why the topic needs it: the entire ResNet idea is the equation H ( x ) = F ( x ) + x . Rearranged, that is exactly F ( x ) = H ( x ) − x . Without the word "residual" meaning "the gap", the name Residual Network is empty.
Definition Skip / identity connection
A skip connection (also identity shortcut ) is a wire that carries x unchanged around the layers and adds it back at the end:
y = F ( x ) + x
Here y is the block that leaves the residual block. The layers compute F ( x ) ; the wire delivers x ; the "+ " adds them element by element.
Trace the figure: x enters and splits. One copy goes down through the processing layers (that path produces F ( x ) ). The other copy takes the curved bypass over the top , untouched. At the merge circle they are summed to give y . The bypass is the skip connection.
Common mistake "Skip" does not mean "delete a layer"
Skip ::: means a wire that jumps over the layers carrying an unchanged copy of x — the layers are still there and still run. Nothing is skipped in the sense of removed.
Element-wise addition only works if the two blocks are the same shape . That single requirement is the reason the parent note spends a whole example on "dimension matching" — hold that thought.
The parent writes F ( x ) = W 2 ⋅ ReLU ( W 1 ⋅ x + b 1 ) + b 2 . Let's earn every piece.
W and bias b
A weight W i is the tunable numbers of layer i (in a conv layer, the filter values). A bias b i is a constant added afterward. Together they define what that layer computes. The notation { W i } means "the whole collection of weights W 1 , W 2 , … inside this block" — a shorthand so we don't list them all.
ReLU stands for Rectified Linear Unit . As a rule it is dead simple:
ReLU ( z ) = max ( 0 , z )
"Keep positive numbers, turn negatives into 0."
The figure shows ReLU's shape: flat at zero for negative inputs, then a straight 4 5 ∘ line for positives — a bent hinge.
Intuition Why ReLU and not sigmoid here?
The parent note warns that sigmoid/tanh squash their slopes below 1, so multiplying many of them makes gradients vanish. ReLU's slope is exactly 1 wherever the input is positive — it does not shrink the signal. That is why ReLU is the nonlinearity of choice inside a residual block: it keeps gradients healthy on the way back.
The gradient section of the parent is scary only because of unfamiliar symbols. Here they are, one at a time.
L
L (script L) is one number: how wrong the network's output is. Training's whole job is to make L small.
Definition Partial derivative
∂ x ∂ L
Read it as: "if I nudge x a tiny bit, how much does L move?" It is a sensitivity — the slope of loss with respect to x . Big value → x matters a lot right now; near zero → x barely affects the loss (this is the "vanishing gradient" danger).
Intuition Why this predicts the vanishing-gradient disaster
In a plain deep network the path from the loss to an early layer passes through every layer, so its sensitivity is a product of many slopes. If each slope is a fraction (below 1), multiplying dozens of them drives the result toward 0 — the early layer stops learning. This product is the villain ResNet is built to defeat.
Now the "+ 1 " miracle reads plainly. With y = F ( x ) + x :
∂ x ∂ y = ∂ x ∂ F ( x ) + = 1 ∂ x ∂ x
The skip wire contributes a clean + 1 that the shrinking product can never kill. Even if ∂ x ∂ F → 0 , the sensitivity keeps its + 1 and the gradient still reaches the early layers.
Stride is how many pixels the conv filter jumps each step. Stride 1 = look at every position (output stays same size). Stride 2 = skip every other position, so the output grid is half the height and width. That is how 56 × 56 becomes 28 × 28 .
1 × 1 convolution
A ==1 × 1 conv== is a filter that looks at a single pixel across all channels. It cannot change H or W , but it can freely change the number of channels C (e.g. 64 → 128). It is the cheapest way to remix or resize the channel dimension.
Common mistake Why not reshape and lose nothing?
You might think any resize is fine. ::: W s must match both the spatial size (via stride) and channel count (via number of filters) of F ( x ) , or the element-wise + still fails.
Tensor x = C x H x W stack of grids
Mapping H of x the ideal output
Residual F of x = H minus x the gap
Skip connection y = F of x + x
Weights W and ReLU inside F of x
Loss L one number of wrongness
Partial derivative sensitivity
Chain rule multiply slopes
Stride and 1x1 conv change shape
Cover the right side and answer aloud. If any stumps you, re-read its section above.
What shape does 64 × 56 × 56 describe? 64 channels, each a 56 × 56 grid — a stack of 64 pages.
What does F ( x ) mean in words? The residual, the gap H ( x ) − x : how much to change x to reach the desired output.
What is the skip connection physically? A wire carrying an unchanged copy of x around the layers, added back at the end.
Why ReLU instead of sigmoid inside the block? ReLU's slope is 1 for positive inputs, so it does not shrink gradients the way sigmoid does.
What does ∂ x ∂ L measure? How much the loss L changes if you nudge x — a sensitivity/slope.
State the chain rule in words. Multiply the slopes along the path from loss to the thing you care about.
Where does the "+ 1 " gradient term come from? From ∂ x ∂ x = 1 , the derivative of the identity skip path.
When do you need a projection W s ? When F ( x ) and x differ in spatial size or channel count, so plain addition would fail.
What does stride 2 do to a 56 × 56 grid? Halves it to 28 × 28 .
What can a 1 × 1 conv change and not change? It changes channel count; it cannot change height or width.