Top Banner
Hopefully a clearer version of Neural Network
34

Hopefully a clearer version of Neural Network. With Actual Weights.

Dec 22, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Hopefully a clearer version of Neural Network. With Actual Weights.

Hopefully a clearer version of Neural Network

Page 2: Hopefully a clearer version of Neural Network. With Actual Weights.

With Actual Weights

Page 3: Hopefully a clearer version of Neural Network. With Actual Weights.

I1

O1

H1

H2I2

W1 W2

-1 0

-10

1

1

Page 4: Hopefully a clearer version of Neural Network. With Actual Weights.

Inputs

• 1 and 0

• Target output {1}

Page 5: Hopefully a clearer version of Neural Network. With Actual Weights.

Hidden Layer Computation

• Xi =iW1 = • 1 * 1 + 0 * -1 = 1, • 1 * -1 + 0 * 1 = -1 = • { 1 - 1} = {Xi1,Xi2} = Xi

xF

1

1

Page 6: Hopefully a clearer version of Neural Network. With Actual Weights.

• 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

Page 7: Hopefully a clearer version of Neural Network. With Actual Weights.

I1

O1

H1

H2I2

W1 W2

-10

-10

1

1

1

0

0.73

0.27

Page 8: Hopefully a clearer version of Neural Network. With Actual Weights.

Next Output

Page 9: Hopefully a clearer version of Neural Network. With Actual Weights.

Output Layer Computation

• X = hW2 = • 0.73 * -1 + 0.27 * 0 = -0.73, • { -0.73 } = X

xF

1

1

Page 10: Hopefully a clearer version of Neural Network. With Actual Weights.

• O = F(X)• O1 = F(X1)• O2 = F(X2)

325.01

1

1

1)(

)73.0(

x

XF

Page 11: Hopefully a clearer version of Neural Network. With Actual Weights.

I1

O1

H1

H2I2

W1 W2

-10

-10

1

1

1

0

0.73

0.27

Page 12: Hopefully a clearer version of Neural Network. With Actual Weights.

I1

O1

H1

H2I2

W1 W2

-10

-10

1

1

1

0

0.73

0.27

Page 13: Hopefully a clearer version of Neural Network. With Actual Weights.

I1

O1

H1

H2I2

W1 W2

-10

-10

1

1

1

0

0.73

0.27

0.325

Page 14: Hopefully a clearer version of Neural Network. With Actual Weights.

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

Page 15: Hopefully a clearer version of Neural Network. With Actual Weights.

Weight Adjustment

• △W2t = α hd + Θ △W2t-1

• where α = 1• Time t = 1 so no previous time

dh

dhd

h

hhd

22

111

2

1

)15.0*27.0(

)15.0*73.0(15.0

27.0

73.0hd

Page 16: Hopefully a clearer version of Neural Network. With Actual Weights.

Weight Adjustments

)04.0(

)109.0(

Page 17: Hopefully a clearer version of Neural Network. With Actual Weights.

Weight Change

)04.02(

)109.02(

21

11

W

W

Page 18: Hopefully a clearer version of Neural Network. With Actual Weights.

Equals

)04.00(

)109.01(

Page 19: Hopefully a clearer version of Neural Network. With Actual Weights.

Equals

)04.0(

)891.0(

Page 20: Hopefully a clearer version of Neural Network. With Actual Weights.

Putting these new weights in the diagram

• To get

Page 21: Hopefully a clearer version of Neural Network. With Actual Weights.

I1

O1

H1

H2I2

W1 W2

-10.04

-0.8910

1

1

1

0

0.73

0.27

0.325

Page 22: Hopefully a clearer version of Neural Network. With Actual Weights.

Next

• Calculate Change on W1 layer weights

Page 23: Hopefully a clearer version of Neural Network. With Actual Weights.

the next error

outputsk

kikiih dWhhe )1(

Page 24: Hopefully a clearer version of Neural Network. With Actual Weights.

What is this

• Output is O1 • So k = {1}• So if i = 1

outputsk

kikdW

summation

Page 25: Hopefully a clearer version of Neural Network. With Actual Weights.

1111,1

dWdWdWki

kikoutputsk

kik

Page 26: Hopefully a clearer version of Neural Network. With Actual Weights.

I1

O1

H1

H2I2

W1 W2

-10.04

-0.8910

1

1

1

0

0.73

0.27

0.325

Page 27: Hopefully a clearer version of Neural Network. With Actual Weights.

This equals

• e1 = (h1(1-h1)W11 D1• e2 = (h2(1-h2)) W21 D1 • d1 = 0.15e1 = (0.73(1-0.73))( -1* 0.15 )• e2 =( 0.27(1-0.27)) (0 *0.15 )

• e1 = (0.73(0.27)( -0.15))• e2 =( 0.27(0.73)) (0)• e1 = -0.03• e2 = 0

Page 28: Hopefully a clearer version of Neural Network. With Actual Weights.

Weight Adjustment

• △W1t = α Ie + Θ △W2t-1

• where α = 1

2212

211121

2

1

eIeI

eIeIee

I

IIe

)0*0()03.0*0(

)0*1()03.0*1(003.0

0

1Ie

Page 29: Hopefully a clearer version of Neural Network. With Actual Weights.

Weight Adjustment

)0()0(

)0()03.0(

Page 30: Hopefully a clearer version of Neural Network. With Actual Weights.

Existing W1

10

11

11

11

2221

1211

WW

WW

Page 31: Hopefully a clearer version of Neural Network. With Actual Weights.

Weight Change W1

)0(1)0(0

)0(1)03.0(1

Page 32: Hopefully a clearer version of Neural Network. With Actual Weights.

New W1

10

197.0

Page 33: Hopefully a clearer version of Neural Network. With Actual Weights.

• Changing Net

Page 34: Hopefully a clearer version of Neural Network. With Actual Weights.

I1

O1

H1

H2I2

W1 W2

-10.04

-0.8910

0.97

1

1

0

0.73

0.27

0.325