Step 1. Initialize weights and count
Step 2. Set learning rate(a) and Emax α(>0)
Step 3. For each traning pattern pair (X, D)
Step 5. Compute output error
v, w <- small random number
p <- number of traning pattern pairs
k <- 1
E <- 0
Initialize temporary weight variation
p <- number of traning pattern pairs
k <- 1
E <- 0
Initialize temporary weight variation
temp_w <- 0
temp_v <- 0
temp_v <- 0
Step 2. Set learning rate(a) and Emax α(>0)
Set momentum constant β(0 < β < 0.8)
Step 3. For each traning pattern pair (X, D)
do step 4 - 9 until k = p
Step 4. compute output
Step 4. compute output
NET_z = Xk inner_product Vk
Z = f(NET_z)
f(NET_z) = 1 / (1 + exp(-NET_z)) ; unipolar sigmoid
(1 - exp(-NET_z)) / (1 + exp(-NET_z)) ; bipolar sigmoid
NET_y = Z inner_product Wt
Y = f(NET_y)
f(NET_y) = 1 / (1 + exp(-NET_y)) ; unipolar sigmoid
(1 - exp(-NET_y)) / (1 + exp(-NET_y)) ; bipolar sigmoid
Z = f(NET_z)
f(NET_z) = 1 / (1 + exp(-NET_z)) ; unipolar sigmoid
(1 - exp(-NET_z)) / (1 + exp(-NET_z)) ; bipolar sigmoid
NET_y = Z inner_product Wt
Y = f(NET_y)
f(NET_y) = 1 / (1 + exp(-NET_y)) ; unipolar sigmoid
(1 - exp(-NET_y)) / (1 + exp(-NET_y)) ; bipolar sigmoid
Step 5. Compute output error
E <- 0.5 * (Dk - Yk)^2 + E
Step 6. Compute error signal
delta_y = (d-y) * y * (1 - y) ; unipolar sigmoid
0.5 * (d-y) * (1-y^2) ; bipolar sigmoid
delta_z = z * (1-z) * sumation of delta_y*W ; unipolar sigmoid
0.5 * (1-z^2) * sumation of delta_y*W ; bipolar sigmoid
0.5 * (d-y) * (1-y^2) ; bipolar sigmoid
delta_z = z * (1-z) * sumation of delta_y*W ; unipolar sigmoid
0.5 * (1-z^2) * sumation of delta_y*W ; bipolar sigmoid
Setp 7. Update weights
Wk+1 = Wk + ΔWk
= Wk + a * δy * Zk + βΔWk-1
Vk+1 = Vk + ΔVk
= Vk + a * δz * Xk + βΔVk-1
= Wk + a * δy * Zk + βΔWk-1
Vk+1 = Vk + ΔVk
= Vk + a * δz * Xk + βΔVk-1
Step 8. Save weight variation
temp_w <- Δwk
temp_v <- Δvk
temp_v <- Δvk
Step 9. Increase counter and goto Step 3
k <- k + 1
Step 10. Test stop condition
If E < Emax, stop
else E <- 0, goto Step 3
역시 책업ㅂ을때 보려구 블로그에 백업
'신경망' 카테고리의 다른 글
| Hopfield network의 루비 구현 (3) | 2009/02/14 |
|---|---|
| 역전파망의 루비 구현 - Backpropagation Network in Ruby (0) | 2009/01/29 |
| 모멘텀 BP 알고리즘 momentum BP algorithm (0) | 2009/01/15 |
| Backpropagation algorithm (0) | 2008/12/30 |
| MADALINE 학습 알고리즘 - MR I (4) | 2008/11/28 |
| 퍼셉트론 학습 알고리즘 (0) | 2008/11/28 |

댓글을 달아 주세요