ReLU forward pass

Problem

Let

z=Wx+b,h=ReLU⁡(z),y^=vTh+c,z=Wx+b,\qquad h=\operatorname{ReLU}(z),\qquad \hat{y}=v^{\mathsf T}h+c,

with

W=[1−1−21],b=(0,1),x=(2,−1),v=(2,−1),c=12.W=\begin{bmatrix}1&-1\\-2&1\end{bmatrix},\quad b=(0,1),\quad x=(2,-1),\quad v=(2,-1),\quad c=\frac{1}{2}.

Compute zz, hh, and y^\hat{y}.

Reveal answer or reference solution

The preactivation is

z=Wx+b=(3,−4).z=Wx+b=(3,-4).

Applying ReLU gives h=(3,0)h=(3,0). Therefore,

y^=2(3)−1(0)+12=132=6.5.\hat{y}=2(3)-1(0)+\frac{1}{2}=\frac{13}{2}=6.5.
Outcome

Previous attempts

Loading attempts saved in this browser…

    Review Screening Results