Hopefully a clearer version of Neural Network
-
Upload
daquan-burch -
Category
Documents
-
view
30 -
download
0
description
Transcript of Hopefully a clearer version of Neural Network
Layers of Weights
• We Name Sets of Weights between layersAs W1 for weights between input Layer and
First Hidden LayerW2 for weights between next 2 layers and WN-1 for Weights between N-1th and Nth
Layer(i.e. Output Layer)In our example Net we just have 3 layersInput Hidden and Output So we have just
W1 and W2
Weights along Individual Links
• Convention
• Each Weight is named as follows
• WNij
• N refers to the Layer of Weights
• So Between Input and First Hiden Layer i.e. W2ij is the Reference
• Between Hidden and Output W2ij
Individual Weights within a layer
• Reference WNij
• WN refers to the Weight Layer
• ij refers to the indices of the source and destination nodes.
• So for example the weight between hidden node h1 and output node o2
• It belongs to weight layer 2 so W2
• i = 1 and j = 2 so Weight is W212
Hidden Layer Computation
• Xi =iW1 = • 1 * 1 + 0 * -1 = 1, • 1 * -1 + 0 * 1 = -1 = • { 1 - 1} = {Xi1,Xi2} = Xi
xF
1
1
• h = F(X)• h1 = F(Xi1) = F(1)• h2 = F(Xi2) = F(-1)
27.01
1
1
1)2(
73.01
1
1
1)1(
)1(2
)1(1
xi
xi
XiF
XiF
Output Layer Computation
• X = hW2 = • 0.73 * -1 + 0.27 * 0 = -0.73, • 0.73 * 0 + 0.27 * -1 = -0.27 =• { -0.73 - 0.27} = {X1,X2} = X
xF
1
1
Error
• D= Output(1 – Output)(Target – Output)• Target T1 = 1 , O1 = 0.325 = 0.33
• d1 = 0.33( 1 -0.33)(1 -0.33 ) = 0.33 (0.67)(0.67) = 0.148
• Target T2 = 1 , O2 = 0.433 = 0.43
• d2 = 0.43(1 - 0.43)(1-0.43) = 0.43(0.57)(0.57) = 0.14
Weight Adjustment
• △W2t = α hd + Θ △W2t-1
• where α = 1• Time t = 1 so no previous time
2212
211121
2
1
dhdh
dhdhdd
h
hhd
)14.0*27.0()15.0*27.0(
)14.0*73.0()15.0*73.0(14.015.0
27.0
73.0hd
This equals
• e1 = (h1(1-h1)W11 D1 +W12D2• e2 = (h2(1-h2)) W21 D1 +W22D2• d1 = 0.15 d2 = = 0.14e1 = (0.73(1-0.73))( -1* 0.15 +0*0.14)• e2 =( 0.27(1-0.27)) (0 *0.15 +-1*0.14)
• e1 = (0.73(0.27)( -0.15))• e2 =( 0.27(0.73)) (-0.14)• e1 = -0.03• e2 = -0.028
Weight Adjustment
• △W1t = α Ie + Θ △W2t-1
• where α = 1
2212
211121
2
1
eIeI
eIeIee
I
IIe
)028.0*0()03.0*0(
)028.0*1()03.0*1(028.003.0
0
1Ie