Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

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
  • 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.

ร—