Successfully reported this slideshow.
Upcoming SlideShare
×

# How does a Neural Network work?

491 views

Published on

How does a Neural Network work is part of JavaLand talk. Find more info on https://goo.gl/rrLd1N

Published in: Data & Analytics
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

### How does a Neural Network work?

1. 1. How does a Neural Network work? 1 1 Bias ๐1 ๐2 ๐ป1 ๐ป2 Bias-30 20 20 10 -20 -10 -10 20 20 ๐ Input Layer Hidden Layer Output Layer XNOR Operation The Neural Network is already trained to simulate XNOR operation.
2. 2. How does a Neural Network work? 1 1 Bias ๐1 ๐2 ๐ป1 ๐ป2 Bias-30 20 20 -10 20 20 ๐ Input Layer Hidden Layer Output Layer W๐ก๐๐ญ ๐ข๐ฌ ๐ญ๐ก๐ ๐ฏ๐๐ฅ๐ฎ๐ ๐๐จ๐ซ ๐ ๐, ๐ฐ๐ก๐๐ง ๐ ๐ = ๐ ๐๐ง๐ ๐ ๐ = ๐? ๐ป1= -30 + 20๐1 + 20๐2 = -30 -> 0 0 0 0 XNOR Operation
3. 3. How does a Neural Network work? 1 1 Bias ๐1 ๐2 ๐ป1 ๐ป2 Bias 10 -20 -10 -10 20 20 ๐ Input Layer Hidden Layer Output Layer W๐ก๐๐ญ ๐ข๐ฌ ๐ญ๐ก๐ ๐ฏ๐๐ฅ๐ฎ๐ ๐๐จ๐ซ ๐ ๐, ๐ฐ๐ก๐๐ง ๐ ๐ = ๐ ๐๐ง๐ ๐ ๐ = ๐? ๐ป2= 10 - 20๐1 - 10๐2 = 10 -> 1 0 0 0 1 XNOR Operation
4. 4. How does a Neural Network work? 1 1 Bias ๐1 ๐2 ๐ป1 ๐ป2 Bias-30 20 20 10 -20 -10 -10 20 20 ๐ Input Layer Hidden Layer Output Layer W๐ก๐๐ญ ๐ข๐ฌ ๐ญ๐ก๐ ๐ฏ๐๐ฅ๐ฎ๐ ๐๐จ๐ซ ๐ , ๐ฐ๐ก๐๐ง ๐ ๐ = ๐ ๐๐ง๐ ๐ ๐ = ๐? 0 0 0 1 ๐ = -10 + 20๐ป1 + 20๐ป2 = 10 -> 1 1 XNOR Operation
5. 5. How does a Neural Network work? 1 1 Bias ๐1 ๐2 ๐ป1 ๐ป2 Bias-30 20 20 -10 20 20 ๐ Input Layer Hidden Layer Output Layer W๐ก๐๐ญ ๐ข๐ฌ ๐ญ๐ก๐ ๐ฏ๐๐ฅ๐ฎ๐ ๐๐จ๐ซ ๐ ๐, ๐ฐ๐ก๐๐ง ๐ ๐ = ๐ ๐๐ง๐ ๐ ๐ = ๐? ๐ป1= -30 + 20๐1 + 20๐2 = -10 -> 0 0 0 1 XNOR Operation
6. 6. How does a Neural Network work? 1 1 Bias ๐1 ๐2 ๐ป1 ๐ป2 Bias 10 -20 -10 -10 20 20 ๐ Input Layer Hidden Layer Output Layer W๐ก๐๐ญ ๐ข๐ฌ ๐ญ๐ก๐ ๐ฏ๐๐ฅ๐ฎ๐ ๐๐จ๐ซ ๐ ๐, ๐ฐ๐ก๐๐ง ๐ ๐ = ๐ ๐๐ง๐ ๐ ๐ = ๐? ๐ป2= 10 - 20๐1 - 10๐2 = 0 -> 0 0 0 1 0 XNOR Operation
7. 7. How does a Neural Network work? 1 1 Bias ๐1 ๐2 ๐ป1 ๐ป2 Bias-30 20 20 10 -20 -10 -10 20 20 ๐ Input Layer Hidden Layer Output Layer W๐ก๐๐ญ ๐ข๐ฌ ๐ญ๐ก๐ ๐ฏ๐๐ฅ๐ฎ๐ ๐๐จ๐ซ ๐ , ๐ฐ๐ก๐๐ง ๐ ๐ = ๐ ๐๐ง๐ ๐ ๐ = ๐? 0 0 1 0 ๐ = -10 + 20๐ป1 + 20๐ป2 = -10 -> 0 0 XNOR Operation
8. 8. How does a Neural Network (NN) work? 1 1 Bias ๐1 ๐2 ๐ป1 ๐ป2 Bias-30 20 20 -10 20 20 ๐ Input Layer Hidden Layer Output Layer W๐ก๐๐ญ ๐ข๐ฌ ๐ญ๐ก๐ ๐ฏ๐๐ฅ๐ฎ๐ ๐๐จ๐ซ ๐ ๐, ๐ฐ๐ก๐๐ง ๐ ๐ = ๐ ๐๐ง๐ ๐ ๐ = ๐? ๐ป1= -30 + 20๐1 + 20๐2 = -10 -> 0 1 0 0 XNOR Operation
9. 9. How does a Neural Network work? 1 1 Bias ๐1 ๐2 ๐ป1 ๐ป2 Bias 10 -20 -10 -10 20 20 ๐ Input Layer Hidden Layer Output Layer W๐ก๐๐ญ ๐ข๐ฌ ๐ญ๐ก๐ ๐ฏ๐๐ฅ๐ฎ๐ ๐๐จ๐ซ ๐ ๐, ๐ฐ๐ก๐๐ง ๐ ๐ = ๐ ๐๐ง๐ ๐ ๐ = ๐? ๐ป2= 10 - 20๐1 - 10๐2 = -10 -> 0 1 0 0 0 XNOR Operation
10. 10. How does a Neural Network work? 1 1 Bias ๐1 ๐2 ๐ป1 ๐ป2 Bias-30 20 20 10 -20 -10 -10 20 20 ๐ Input Layer Hidden Layer Output Layer W๐ก๐๐ญ ๐ข๐ฌ ๐ญ๐ก๐ ๐ฏ๐๐ฅ๐ฎ๐ ๐๐จ๐ซ ๐ , ๐ฐ๐ก๐๐ง ๐ ๐ = ๐ ๐๐ง๐ ๐ ๐ = ๐? 1 0 0 0 ๐ = -10 + 20๐ป1 + 20๐ป2 = -10 -> 0 0 XNOR Operation
11. 11. How does a Neural Network work? 1 1 Bias ๐1 ๐2 ๐ป1 ๐ป2 Bias-30 20 20 -10 20 20 ๐ Input Layer Hidden Layer Output Layer W๐ก๐๐ญ ๐ข๐ฌ ๐ญ๐ก๐ ๐ฏ๐๐ฅ๐ฎ๐ ๐๐จ๐ซ ๐ ๐, ๐ฐ๐ก๐๐ง ๐ ๐ = ๐ ๐๐ง๐ ๐ ๐ = ๐? ๐ป1= -30 + 20๐1 + 20๐2 = 10 -> 1 1 1 1 XNOR Operation
12. 12. How does a Neural Network work? 1 1 Bias ๐1 ๐2 ๐ป1 ๐ป2 Bias 10 -20 -10 -10 20 20 ๐ Input Layer Hidden Layer Output Layer W๐ก๐๐ญ ๐ข๐ฌ ๐ญ๐ก๐ ๐ฏ๐๐ฅ๐ฎ๐ ๐๐จ๐ซ ๐ ๐, ๐ฐ๐ก๐๐ง ๐ ๐ = ๐ ๐๐ง๐ ๐ ๐ =1? ๐ป2= 10 - 20๐1 - 10๐2 = -20 -> 0 1 1 1 0 XNOR Operation
13. 13. How does a Neural Network work? 1 1 Bias ๐1 ๐2 ๐ป1 ๐ป2 Bias-30 20 20 10 -20 -10 -10 20 20 ๐ Input Layer Hidden Layer Output Layer W๐ก๐๐ญ ๐ข๐ฌ ๐ญ๐ก๐ ๐ฏ๐๐ฅ๐ฎ๐ ๐๐จ๐ซ ๐ , ๐ฐ๐ก๐๐ง ๐ ๐ = ๐ ๐๐ง๐ ๐ ๐ = ๐? 1 1 1 0 ๐ = -10 + 20๐ป1 + 20๐ป2 = 10 -> 1 0 XNOR Operation
14. 14. How does a Neural Network work? 1 1 Bias ๐1 ๐2 ๐ป1 ๐ป2 Bias-30 20 20 10 -20 -10 -10 20 20 ๐ Input Layer Hidden Layer Output Layer How do you train a Neural Network? 1 1 1 0 1 1) The edges are initialized with random weights. 2) A ๐1, ๐2 pair is given as un input. The network produces an erronous ๐ ๐น. Based on the Error ๐ = |๐ โ ๐ ๐น| the edges are updated from right to the left in a way so that a renewed input of ๐1, ๐2 would produce ๐ ๐น that is closer to ๐, thus the error ๐ is smaller. 3) Step 2 is executed for all pairs ๐1, ๐2 until the error ๐ is small enough for the network to be usable.