First Layer Versus Last Layer

Calculus in Deep LearningHard+30 XP+30

First Layer Versus Last Layer

A 3-layer network with one unit per layer and a smooth activation ϕ\phiϕ:

a0=x,zl=wl al−1,al=ϕ(zl)a_0 = x, \qquad z_l = w_l\,a_{l-1}, \qquad a_l = \phi(z_l)a0​=x,zl​=wl​al−1​,al​=ϕ(zl​)

On one batch, with input x=2x = 2x=2, the forward pass recorded these values:

layer lllweight wlw_lwl​activation ala_lal​ϕ′(zl)\phi'(z_l)ϕ′(zl​)
1w1w_1w1​0.60.60.60.400.400.40
22.52.52.50.80.80.80.360.360.36
32.02.02.00.50.50.50.750.750.75

and the loss contributes

∂L∂a3=2\frac{\partial L}{\partial a_3} = 2∂a3​∂L​=2

Compute the gradient at the first layer's weight, ∂L/∂w1\partial L / \partial w_1∂L/∂w1​, and compare its size with the gradient at the last layer's weight, ∂L/∂w3\partial L / \partial w_3∂L/∂w3​.

Which pair is correct?

Hints

Solve it to unlock the solution

Once you get it right, the reasoning behind the answer shows up here.

Select all that apply.