Assignment2 (Section B)
Assignment2 (Section B)
Assignment2 (Section B)
TECHNOLOGY
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
0.005 0.005
0.5
0.31
0.1
0.31
0.3
0.005 0.005
1
= [1+e0.238]
= 0.4408
1
S(z21 ) = [ 1 ]
1+e−z2
1
= [1+e0.238]
= 0.4408
= 0.2783
= 0.2783
1
S(y11 ) = [ 1 ]
1+e−y1
1
= [1+e−0.2783 ]
= 0.5691
1
S(y21 ) = [ 1 ]
1+e−y2
1
= [1+e−0.2783 ]
= 0.5691
= 1 – 0.5691
= 0.4309
e12 = d12 − S(y21 )
= 0 – 0.5691
= (-0.5691)
= 0.1062
= (−0.1403)
= (−0.0026)
= (−0.0026)
= 1.1 × (−0.0026) × 1
= (−0.0029)
= (−0.0014)
∆m121 = η × δH11 × S(x12 )
= (−0.0003)
∆m131 = η × δH11 × S(x13 )
= (−0.0009)
∆m102 = η × δH21 × 1
= 1.1 × (−0.0028) × 1
= (−0.0031)
= (−0.0014)
= (−0.0003)
= (−0.0009)
∆n101 = η × δ11 × 1
= 1.1 × 0.1062 × 1
= 0.1168
= 0.0515
∆n121 = η × δ11 × S(z21 )
= 0.0515
∆n102 = η × δ12 × 1
= 1.1 × (−0.1403) × 1
= (−0.1543)
= (−0.0680)
= (−0.0680)
= 0.005 + 0.1168
= 0.1218
2 1 1
n11 = 𝑛11 + ∆𝑛11
= 0.31 + 0.0515
= 0.3615
= 0.31 + 0.0515
= 0.0565
n202 = 𝑛102 + ∆𝑛102
= 0.005 + (−0.1543)
= (−0.1493)
2 1 1
n12 = 𝑛12 + ∆𝑛12
= 0.31 + (−0.0680)
= 0.242
= 0.31 + (−0.0680)
= 0.242
2
𝑚01 = 𝑚101 + ∆𝑚101
= 0.005 + (−0.0029)
= (0.0021)
2 1 1
𝑚11 = 𝑚11 + ∆𝑚11
= (−0.27) + (−0.0014)
= (−0.2714)
2
𝑚21 = 𝑚121 + ∆𝑚121
= (−0.27) + (−0.0003)
= (−0.2703)
2
𝑚31 = 𝑚131 + ∆𝑚131
= (−0.27) + (−0.0009)
= (−0.2709)
2
𝑚02 = 𝑚102 + ∆𝑚102
= 0.005 + (−0.0029)
= (0.0021)
2 1 1
𝑚12 = 𝑚12 + ∆𝑚12
= (−0.27) + (−0.0014)
= (−0.2714)
2
𝑚22 = 𝑚122 + ∆𝑚122
= (−0.27) + (−0.0003)
= (−0.2703)
2
𝑚32 = 𝑚132 + ∆𝑚132
= (−0.27) + (−0.0009)
= (−0.2709)
Notice that since this is the first iteration there is no effect of the momentum term since the
weight change on the previous iteration was zero.
Pattern 2:
0.0021 0.1218
0.4
0.3615
0.6
0.242
0.4
0.0021 -0.1493
= (-0.377)
z22 = [x12 × m12
2 ]
+ [x22 × m222 ] + [x32 × m232 ] + m202
= (-0.377)
1
S(z12 ) = [ 2 ]
1+e−z1
1
= [1+e0.377]
= 0.4069
1
S(z22 ) = [ 2 ]
1+e−z1
1
= [1+e0.377]
= 0.4069
= 0.4160
= 0.0476
1
S(y12 ) = [ 2 ]
1+e−y1
1
= [1+e−0.4160 ]
= 0.6025
1
S(y22 ) = [ 2 ]
1+e−y2
1
= [1+e−0.0476 ]
= 0.5119
e12 = d12 − S(y12 )
= 0 – 0.6025
= (-0.6025)
= 1 – 0.5119
= 0.4881
= (−0.1454)
= 0.1178
= (−0.0457)
= (−0.0457)
= 1.1 × (−0.0457) × 1
= (−0.0503)
2
∆m11 = η × δH12 × S(x12 )
= (−0.0201)
= (−0.0302)
= (−0.0201)
∆m202 = η × δH22 × 1
= 1.1 × (−0.0457) × 1
= (−0.0503)
2
∆m12 = η × δH22 × S(x12 )
= (−0.0201)
= (−0.0302)
= (−0.0201)
∆n201 = η × δ12 × 1
= 1.1 × (−0.1454) × 1
= (−0.1599)
2
∆n11 = η × δ12 × S(z12 )
= (−0.0651)
= (−0.0651)
∆n202 = η × δ22 × 1
= 1.1 × 0.1178 × 1
= 0.1296
2
∆n12 = η × δ22 × S(z12 )
= 0.0527
= 0.0527
Since there were weights changes in the previous iteration, the momentum term comes into
the update procedure.
= 0.0320
3 2 2
n11 = n11 + ∆n11 + ∝ × ∆n111
= 0.3273
n321 = n221 + ∆n221 + ∝ × ∆n121
= 0.3273
= (−0.1123)
3 2 2
n12 = n12 + ∆n12 + ∝ × ∆n112
= 0.2539
= 0.2539
= (−0.0499)
3 2 2
m11 = m11 + ∆m11 + ∝ × ∆m111
= (−0.2923)
= (−0.3007)
= (−0.2915)
m302 = m202 + ∆m202 + ∝ × ∆m102
= (−0.0499)
3 2 2
m12 = m12 + ∆m12 + ∝ × ∆m112
= (−0.2923)
= (−0.3007)
= (−0.2915)
Pattern 3:
-0.0499 0.0320
0.3273
0.2539
-0 .0499 -0.1123