home *** CD-ROM | disk | FTP | other *** search
- csv3.1 !file format is Control Strategy Version 3.1
- ! Sep 90 (bkpprune.nnc) Back Propagation Network (recurrent)
- !************************************************************************
- !* *
- !* Back Propagation Network Control Strategy *
- !* *
- !************************************************************************
- !
- ! 08-Sep-90 re-done. Allows for recurrent connections in hidden layer
- ! by delaying output of hidden PEs until all outpus are computed.
- ! Likewise, delays learning until error is back-propagated.
- !
- !MASK label op-code operands comment
- L_saR_sa trace aux3 ! 0 set trace option to aux3
- L_saR_sa optclr op:bknc ! 1 do not BKp to PEs w/o conns
- Li_aR_sa cset recall,0 ! 2 recall count
- !
- ! Get input (learn and recall) and desired output (learn only)
- !
- L_saR_sa lset in ! 3 input layer
- L___R_sa io read ! 4 get input data (recall)
- L_saR___ io lrnin ! 5 get input data (learn)
- L_saR_sa lset out ! 6 output layer
- L_saR___ io lrnout ! 7 get desired output (learn)
- L___R_sa io rcltst ! 8 get desired output (test)
- !
- ! Start with the first layer for a forward pass through network
- !
- L_saR_sa lset in ! 9 input layer
- L___R_sa @rloop math sum|rnoise|tran|e=0 ! 10
- L_saR___ math sum|lnoise|tran|e=0|fire ! 11
- L_saR_sa math output|fire ! 12 delayed output for recurrence
- L_saR_sa lset cur,1 ! 13 next layer
- L_saR_sa lcmp out ! 14 at output layer ?
- L_saR_sa blt @rloop ! 15 loop till done
- !
- ! Compute final outputs
- !
- L___R_sa math sum|rnoise|tran|output|e-=w !16 Recall
- L_saR___ math sum|lnoise|tran|output|e-=w|e*=ef|fire ! 17 learn
- !
- ! Write results to userio
- !
- L___R_sa io write ! 18 recall
- L_saR___ io lrnrslt ! 19 learn
- !
- ! Learn cycle - back propagate error. Store unscaled error in
- ! current error field.
- !
- L_saR___ lset out ! 20 set output layer
- L_saR___ @lloop math ce=e|e*=f'|backp|fire ! 21
- L_saR___ math learn|fire ! 22 delayed learning for recurrence
- L_saR___ lset cur,-1 ! 23 previous layer
- L_saR___ lcmp in ! 24 at input layer ?
- L_saR___ bgt @lloop ! 25 loop till done
- LisaRisa trace 0 ! 26 turn off any trace function
-