神经网络基础理论+算法

  • 353 浏览

tuoxie2046

2018/10/20 发布于 技术 分类

讲师:HRG研究员Azhar Aulia Saputra 题目:《強化学習》

人工智能  深度学习 

文字内容
1. The Basic of Artificial Neural Network Azhar Aulia Saputra azhar.aulia.s@gmail.com
2. What are Neural Networks? • Models of the brain and nervous system • Highly parallel – Process information much more like the brain than a serial computer • Learning • Very simple principles • Very complex behaviors • Applications – As powerful problem solvers – As biological models
3. ANNs – The basics • ANNs incorporate the two fundamental components of biological neural nets: 1. Neurones (nodes) 2. Synapses (weights)
4. ANNs – The basics Neuron vs Node
5. ANNs – The basics Structure of a node Squashing function limits node output
6. ANNs – The basics Synapse vs Weight
7. Feed forward NN • Information flow is unidirectional • Data is presented to Input layer • Passed on to Hidden Layer • Passed on to Output layer • Information is distributed • Information processing is parallel Internal representation (interpretation) of data
8. Implementation of hierarchical NN (֊૚‫ܕ‬NNͷ࣮૷) ࠓճ͸ɼ֊૚‫ܕ‬NNΛ༻͍Δ͜ͱʹΑΓɼXORΛग़ྗ͢ΔϓϩάϥϜͷ࡞ ੒Λߦͳ͍ͬͯ͘ In this case, by using hierarchical NN,We will create a program to output XOR ೖྗ1 ೖྗ2 ग़ྗ ೖྗ2 0 0 0 1 0 1 1 1 0 1 1 1 0 0 1 ೖྗ1 ઢ‫ܗ‬෼཭ෆՄೳͳ໰୊ ֊૚‫ܕ‬NNΛBPͰֶश͍ͯ͘͠
9. Artificial Neural Network ֊૚‫ܕ‬NN P൪໨ͷೖྗύλʔϯʹର͢Δೖग़ྗؔ܎ Input-output relation to P-th input pattern ( ) xip = hi zip ʢ1.1ʣ ∑ zip = wij yjp j ʢ1.2ʣ ɽɽɽ ɽɽɽ j wij yjp xip i (s-1)layer s-layer hi(.)͸ඍ෼Մೳͳඇ‫ݮ‬গؔ਺ hi(.) Is a differentiable non-decreasing function ద੾ͳೖखྗؔ܎Λֶश͢ΔͨΊʹ͸ɼ‫ࢣڭ‬σʔλΛ༻͍ͯɼ ݁߹ॏΈΛֶश͢Δඞཁ͕͋Δ In order to learn the proper availability relationship, it is necessary to learn the connection weight using the teaching data
10. Artificial Neural Network ֶशख๏ P൪໨ͷೖྗύλʔϯʹର͢Δ‫਺ؔࠩޡ‬ Error function for P-th input pattern ∑( ) ( ) Ep w =1 2 i xip − oip 2 ʢ1.3ʣ ग़ྗ஋ ‫ࢣڭ‬஋ ૯‫( ਺ؔࠩޡ‬Total error) E(w) = ∑Ep P ࠷খԽ໰୊ (Minimization problem) E(w)Λ࠷খԽ͢ΔͨΊʹɼޯ഑๏Λ࢖༻ To minimize E(w), use the gradient method ( ) w(k+1) = w(k) − ηk Ew w εςοϓ෯ w=w(k) ʢ1.4ʣ
11. Artificial Neural Network BP๏Ͱ͸ɼεςοϓ෯‫ݻ‬ఆ͔ͭɼύλʔϯpʹର͢Δ‫਺ؔࠩޡ‬Ep(w)ͷ ࠷খԽΛ໨ࢦ͢ߋ৽ଌΛ༻͍Δ In the BP method, an update measurement aiming at minimizing the error function Ep (w) with respect to the pattern p with the step width fixed is used νΣΠϯϧʔϧ ( ) w(k+1) = w(k) −η ∂Ep w ∂w w=w(k) ʢ1.5ʣ ∂Ep (w) ∂wij = ∂Ep (w) ∂zip ∂zip ∂wij = ∂Ep (w) ∂zip y jp ʢ1.6ʣ ∂Ep (w) ∂zip = ∂Ep (w) ∂ xip ∂ xip ∂zip ( ) = ∂Ep (w ∂ xip ) h′ zip ʢ1.7ʣ ͜͜Ͱɼ؆ུԽͷͨΊ ( ) δip = − ∂Ep (w) ∂ xip h′ zip ͱ͢Δͱɼ ∂Ep (w) ∂wij = −δ ip y jp ʢ1.9ʣ ʢ1.8ʣ
12. Artificial Neural Network ୈs૚ୈiχϡʔϩϯ͕ग़ྗ૚ʹଐ͍ͯ͠Δ৔߹ When the s-th layer i-th neuron belongs to the output layer ( ) ∂Ep (w) ∂ xip = xip − oip ʢ1.10ʣ ( ) ( ) δip = − xip − oip h′ zip ʢ1.11ʣ ୈs૚ୈiχϡʔϩϯ͕ग़ྗ૚ʹଐ͍ͯ͠ͳ͍৔߹ When the s-th layer i-th neuron does not belong to the output layer ∑ ( ) ∂Ep w ∂ xip = δ w kp ki k ( )∑ δ s ip = hi′ zip δ w s+1 kp ki k ʢ1.13ʣ ʢ1.12ʣ
13. Artificial Neural Network ೖग़ྗؔ਺ Input / output function γάϞΠυؔ਺ Sigmoid function hi ( x ) = 1 + 1 exp ( − x ) ඍ෼ ඍ෼஋Λ؆୯ʹ‫ࢉܭ‬Մೳ hi′(x) = hi (x)⋅(1− hi (x)) (1)
14. Artificial Neural Network NNͷϞσϧ XOR͸2-2-1ͷϞσϧΛ༻͍Δ͜ͱͰֶशՄೳ ೖྗ1 ೖྗ2 ग़ྗ 1 1 ᮢ஋ͷͨΊͷϢχοτ ॳ‫ظ‬Խ (Initialize) ɾֶश܎਺ͱऴྃ৚݅ͷઃఆΛߦͳ͏ Set learning coefficients and termination conditions ɾશ݁߹ॏΈΛཚ਺ʹΑͬͯఆΊΔ All connection weights are determined by random numbers
15. Artificial Neural Network ॏΈͷߋ৽ଇ (Weight updating) Δw(k) = ηδ ip yip + βΔw(k−1) ‫׳‬ੑ߲ ‫׳‬ੑ߲ͷ௥Ճ w(k+1) = w(k ) + Δw(k ) Δw( k ) = −η ∂Ep (w) ∂w = ηδ ip yip (i) ୈs૚ୈiχϡʔϩϯ͕ग़ྗ૚ʹଐ͍ͯ͠Δ৔߹ ( ) ( ) δip = − xip − oip hi′ zip (ii) ୈs૚ୈiχϡʔϩϯ͕ग़ྗ૚ʹଐ͍ͯ͠ͳ͍৔߹ ( )∑ δip = hi′ zip δ w kp ki k ऴྃ৚݅൑ఆ (condition) ɾશͯͷֶशύλʔϯʹରͯ͠ॏΈͷߋ৽Λߦͳ͍ɼೋ৐ ‫͕ࠩޡ‬ऴྃ৚݅Λຬͨ͞ͳ͚Ε͹࠶ͼॏΈͷߋ৽Λߦͳ ͏ Weighting is updated for all learning patterns, and squaring If the error does not satisfy the termination condition, the weight is updated again ɾೋ৐‫͕ࠩޡ‬ऴྃ৚݅Λຬͨ͢ɼ΋͘͠͸ɼߋ৽ճ਺͕‫ن‬ఆ஋Λӽ͑ͨ৔߹ɼֶशΛऴྃ͢Δ If the square error satisfies the termination condition, or the update number is specified If it exceeds the value, the learning is ended
16. Structure Summation Equations ! X m Sy(t) = f (Sy0 (t)) = f xi(t)Aij + bj 0i 1 Xp Ok(t) = g(Ok0 (t)) = g @ sj(t)Cjk + bkA j k = (dk gk(Ok))f 0(Ok0 ) Xq j= kCjkf 0(Sj0 ) k C(t + 1) = C(t) + ⌘s(t) T k A(t + 1) = A(t) + ⌘s(t 1) T j • xi(t) : the input value of the tilt sensor from the i-th input neuron illustrated in the figure. • S’y (t) : the input value of the y-th hidden neuron • Sy : the output value of the y-th hidden neuron • Ok(t) : the output value representing the value of joint angle of hands. • !k • !j • dk : the error propagation output neuron : the error propagation hidden neuron : the desired output