Also called a multilayer perceptron and learning by back propagation.
test yourself
Six questions, four to pick from and two for paper. Three numbers such as 3; 4; 20 are the hidden units, the step size and the passes. Each answer stays hidden until you open it.
A network with 3 hidden units makes 20 passes. How many weights does it nudge in all?
the answer, and why
the answer is B
Each pass nudges 3 × 3 + 3 + 1 = 13 weights, the 9 into the hidden units, the 3 out of them and the output's bias. 13 × 20 = 260.
if you chose another
AThat counts the hidden units each pass, not the weights.
CThat is one pass.
DThat counts the corners fed, 4 a pass.
2question 2
The starting network with 2 hidden units gives the corners 0 0, 0 1, 1 0 and 1 1 the outputs 0.456, 0.449, 0.432 and 0.426. Their answers are 0, 1, 1 and 0. What is the loss, to the thousandth?
the answer, and why
the answer is D
The misses are 0.456 − 0 = 0.456, 1 − 0.449 = 0.551, 1 − 0.432 = 0.568 and 0.426 − 0 = 0.426. Squared, about 0.208, 0.304, 0.323 and 0.181, which add to 1.016. Their average over the 4 corners, 1.016 ÷ 4, is about 0.254.
AThe step size changes how far each weight moves, not how many move.
CMore passes nudge more in all, but the same number each pass.
DEvery weight is nudged once a pass, whatever it starts at.
4question 4
Two hidden units, step size 8, 50 passes. How many corners are fed in all?
the answer, and why
the answer is D
Each pass feeds the 4 corners forward once. 4 × 50 = 200.
if you chose another
AThat is the weights nudged, 9 × 50.
BThat is the passes.
CThat is one pass.
pen and paper
5question 5about 8 minutes
The watch page's first run, 3 hidden units, after its 150 passes. Worked from the weights it draws, each to the tenth, at the corner 1 1 the hidden units give 0.909, 0.142 and 0.450. Their weights to the output are −3.8, 3.8 and −0.3, and the output's bias is 1.9.
Multiply each hidden value by its weight to the output.
Which hidden unit pushes the output hardest, and towards which shape?
Add the three and the bias, squash the sum (−1.149 gives 0.241), and say whether the corner is right.
a hint
Above 0 pushes towards square, below 0 towards triangle; the product furthest from 0 pushes hardest.
a worked answer
0.909 × −3.8 = −3.454; 0.142 × 3.8 = 0.540; 0.450 × −0.3 = −0.135. Hidden 1, whose −3.454 is furthest from 0, pushes hardest, towards triangle. The sum is 1.9 − 3.454 + 0.540 − 0.135 = −1.149, squashed 0.241. That is under 0.5, so triangle, which is right: at 1 1 across and up agree.
Count the weights one pass nudges, naming each kind.
Write the nudges for passes, and say how they grow.
Count them for 10 passes, and for 2 hidden units and 10 passes.
a hint
Each hidden unit has weights in and a weight out; the output has one more number of its own.
a worked answer
Each hidden unit has 3 weights in, from across, from up and its bias: 12. Then 4 weights to the output and the output's bias: 17 a pass. So in passes, a fixed multiple of , so . For 10 passes, 170. With 2 hidden units, 9 a pass: 90.
Why do 4 hidden units nudge weights in passes?7 of 7 shown
1the move: count one pass
the line:
weights
how many
into the hidden units, 3 each
12
from the hidden units to the output
4
the output's bias
1
a pass
17
The 17 lines of the network with 4 hidden units, as the watch page draws them. Each is nudged once a pass.
why it is allowed: is the weights nudged. Each of the 4 hidden units has 3 weights in, from across, from up and its bias, and 1 out to the output. The output has its bias. A pass nudges each once, and there are passes.
2the move: work out the bracket
the line:
why it is allowed: By line 1, 3 × 4 = 12, and 12 + 4 + 1 = 17. For 10 passes, 170.
guess it, then
3the move: a ceiling
the line:
why it is allowed: By line 2, is exactly , so never above it.
guess it, then
4the move: read it as a bound
the line:
why it is allowed: By line 3, is at most 17 times , a fixed number times , which is what says.
guess it, then
5the move: a floor
the line:
why it is allowed: By line 2 again, never below it either.
guess it, then
6the move: read it as a bound
the line:
why it is allowed: By line 5, never drops below 17 times , which is what says.
guess it, then
7the move: ceiling and floor together
the line:
why it is allowed: Lines 4 and 6 bound by the same growth, .
guess it, then
try it with a small : at , line 1 gives , which you can work out by hand