home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / e / e065 / 4.ddi / SOM_BP.NNC < prev    next >
Encoding:
Text File  |  1991-08-28  |  2.5 KB  |  72 lines

  1. csv3.1        !file format is Control Strategy Version 3.1
  2. !13-Sep-90  (som_bp.nnc)  Self Organizing Map to Back-Propagation Network
  3. !************************************************************************
  4. !*                                    *
  5. !*      2D Self-Organizing Map into Back-prop Network Control Strategy  *
  6. !*                                    *
  7. !************************************************************************
  8. !
  9. !    *** Recall ***
  10. !
  11. !MASK     label    op-code    operands    comment
  12. L_saR_sa    trace    aux3        !  set trace option to aux3
  13. L_saR_sa    cset    recall,1    !  recall count
  14. L___R_sa    lset    in        !  input layer
  15. L___R_sa    io    read        !  get input data
  16. L___R_sa    lset    out        !  output layer
  17. L___R_sa    io    rcltst        !  8 get desired output (test)
  18. L___R_sa    lset    in        !  input layer
  19. L___R_sa     math    sum        !  perform sum 
  20. L___R_sa    math    rnoise|tran|output ! result of input layer
  21. L___R_sa    lset    cur,1        !  next layer, 2D Kohonen layer
  22. L___R_sa    cset    wrk1,0        !  set wrk1=0, for SOM learn flag
  23. L___R_sa     math    sum|output|fire    !  get min euclid dist
  24. L___R_sa    lset    cur,1           !  next layer, hid lyr of back-prop
  25. L___R_sa        math    sum|rnoise|tran|output|e=0   
  26. L___R_sa    lset    cur,1           !  next layer, output of  back-prop
  27. L___R_sa        math    sum|rnoise|ce=e|tran|output|e-=w|swap 
  28. L___R_sa    io    write        !  write results
  29. L___R_sa    br    @exit        !  skip to end
  30. !
  31. !    *** Learning ***
  32. L_saR__        cset    wrk1,1        !  set wrk1=1, for SOM learn flag
  33. L_saR___    lset    in        !  start at input layer
  34. L_saR___    io    lrnin        !  get input data
  35. L_saR___       lset    out,0        !  go to output layer
  36. L_saR___       io      lrnout        !  get output data
  37. L_saR___       lset    in        !  back to input layer
  38.  
  39. L_saR___     math    sum|lnoise|tran|output  ! result of input layer
  40. L_saR___    lset    cur, 1        !  2D Kohonen layer
  41. L_saR___    math    sum|output|fire    ! sum does Euclidean distance, bias
  42.                     ! for conscience
  43. L_saR___    math    learn|fire    ! update wts & freq
  44. L_saR___    lset    cur,1        ! move to hidden layer
  45.  
  46. L_saR___       math    sum|lnoise|tran|output|e=0|fire
  47. L_saR___       lset    cur,1        ! move to output layer, compute out
  48. L_saR__        math    sum|lnoise|tran|output|e-=w|e*=ef|fire
  49. L_saR___       io      lrnrslt    ! write result to userio
  50. !
  51. !    Learn cycle - back propagate error, store unscaled error in
  52. !       current error field
  53. !
  54. L_saR___    lset    out        ! move to output layer
  55. L_saR___    math    ce=e|e*=f'|backp|learn|fire
  56. L_saR___    lset    cur,-1        ! move to hidden layer
  57. L_saR___    math    ce=e|e*=f'|backp|learn|fire
  58. !
  59. !    Tidy up, and tell what actually happened
  60. !
  61. L_saR___    io    lrnrslt        !  tell userio what happened
  62. LisaRisa @exit    trace    0        !  turn off any trace function
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.