The Jacobian of a ReLU Network

Linear Algebra for Deep LearningHard+30 XP+30

The Jacobian of a ReLU Network

A two-layer network with a ReLU in the middle computes

f(x)=W2 ReLU(W1x)f(x) = W_2\,\mathrm{ReLU}(W_1 x)f(x)=W2​ReLU(W1​x)

with

W1=[1−221−11]W2=[1223−11]W_1 = \begin{bmatrix} 1 & -2 \\ 2 & 1 \\ -1 & 1 \end{bmatrix} \qquad W_2 = \begin{bmatrix} 1 & 2 & 2 \\ 3 & -1 & 1 \end{bmatrix}W1​=​12−1​−211​​W2​=[13​2−1​21​]

so the input is 2-dimensional, the hidden layer has 3 units, and the output is 2-dimensional.

ReLU\mathrm{ReLU}ReLU acts entrywise, and its derivative is 111 wherever its input is positive and 000 wherever its input is negative.

Evaluate at x=(3, 1)x = (3,\ 1)x=(3, 1). What is the Jacobian ∂f/∂x\partial f/\partial x∂f/∂x at this point — a 2×22 \times 22×2 matrix?

Hints

Solve it to unlock the solution

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

Select all that apply.