Hidden Units as Detectors
A hidden unit can be read as a small detector.
It computes a weighted sum:
z = x . w + b
Then it applies an activation:
a = relu(z)
If the weighted evidence is strong enough, the unit turns on. If not, it may output zero.
This is only an analogy, but it is useful. A hidden unit can respond to a pattern in the input. Later layers combine those responses into more complex predictions.
Small example
Let:
x = [2, 1]
w = [3, -1]
b = -4
Then:
z = 2 x 3 + 1 x (-1) - 4
= 1
and:
relu(z) = 1
The unit is active.
DL-C04-T06-001Exercise: Detector pre-activation
Let x = [1, 3], w = [2, -1], and b = 1. Compute z = x . w + b.
Compute it first, then check your number.
HintWeighted sum plus bias
Compute 1 x 2 + 3 x (-1) + 1.
SolutionWork it out
z = 2 - 3 + 1 = 0.
DL-C04-T06-002Exercise: Detector activation
Using the previous result z = 0, what is relu(z)?
Compute it first, then check your number.
HintApply ReLU
ReLU returns max(0, z).
SolutionWork it out
relu(0) = max(0, 0) = 0.