The output layer now has two neurons (cat / dog). h1 feeds both of them, so on the way back the contributions of the two paths must be added together. Three rounds; click any number in the diagram to see the derivation.
z = w·a_prev + b
Weighted sum
a = σ(z) = 1/(1+e⁻ᶻ)
Activation, squashed into 0–1
C = Σ(a2 − y)²
Sum of both outputs’ squared errors
σ′(z) = a(1−a)
Slope of the activation
δ = ∂C/∂z
How much this neuron is to blame
∂C/∂a1 = Σⱼ δⱼ·wⱼ
Multi-path sum — the point of this demo
Forward
—
—
Use ← → to step through. The two red steps are the multi-path sum — the link that does not exist in a single-output network.