Alterna · learning material

08.1 The layers process the set of examples

The same weights apply to all examples. Each receives its intermediate numbers, but not its own new network.

What this material covers

Content and key concepts

We took out one neuron.
The same weights apply to all examples. Each receives its intermediate numbers, but not its own new network.
One layer creates intermediate signs for the next layer. Non-linearity does not allow the entire sequence to be folded into one table. Direct branches add corrections to the previous state.
Для изменения рисунка включитеJavaScript; расчёт и теория доступны далее.
Total Weights for Total Batch
Let X have a shupe[B,d_in], W[d_In,d _out], b[d=out]. Line X is an example, column is a sign. Z=XW+b and H=(Z) have a Shape[B.d_out]. Bias is added to each line, weights are reused. N02.N03; here the string batch agreement is adopted.
H
i
j
=
ϕ
(
∑
k
X
i
k
W
k
j
+
b
j
)
.
H_{ij}=\phi\left(\sum_k X_{ik}W_{kj}+b_j\right).
H
ij
​
=
ϕ
(
k
∑
​
X
ik
​
W
kj
​
+
b
j
​
)
.
Take the four XOR entrances, W=[1.1],[1.1][]], b= [0,1].
It's a design example with manual weights. Trainer uses a different, seded initialization and a real Full-batch GD. Hidden layers perform affine+activation, the last layer releases a linear scalar,
not likely
.Loss=5·mean(ortion-barget)2) is chosen for a transparent XOR test rather than a universal loss classification.
Experiment.
Step 0, check the forms and the four preferences. Do one extradate: the real webs have changed, then the loss has been recalculated. Seed changes only choose a new initialization and drop the trajectory; this is not learning yet.
Playable script.
The checked XOR scenario button sets out the width4, dept1, tanh, seed42, scale2, lightning rate1 and 200 subdates. Go to the end: preferences approach [0.1.1.0], but will not be mathematically accurate. This is the result of a real GD on these settings, not a guarantee for another seed. Conservative defaults can basically learn the average Target — compare both trajectorys.
X=[[0,0],[0,1],[1,0],[1,1]]
H=[[max(0,a+b),max(0,a+b-1)] for a,b in X]
out=[h1-2*h2 for h1,h2 in H]
assert H==[[0,0],[1,0],[1,0],[2,1]] and out==[0,1,1,0]
The code repeats the operations just taken care of.
Completely checked Python-example Chapter
Available with a separate file; the short piece shown does not replace its implementation.
Batch increases the activity, does not copy the learning parameters.
The width and depth of the network. How does this matter continue?
Python examples of Chapter 08
Academic base

Textbook contents map