home *** CD-ROM | disk | FTP | other *** search
- csv3.1 ! Control Strategy Version 3.1
- LisaRisa trace aux3 ! set up trace function
- LisaRisa lset in,0 ! read input data
- L___Ri_a io read
- L_saR___ io lrnin
- L_saRi_a cset recall,1 ! set initial recall counter
- L_saRi_a lset in,0 ! start with input layer
- L___Ri_a @InLays math fire|sum|rnoise|tran|output ! process pre layers
- L_saR___ math fire|sum|lnoise|tran|output
- L_saRi_a lset cur,1
- L_saRi_a lcmp out,-1
- L_saRi_a blt @InLays
- L___Ri_a math set|fire|tran|output ! set initial hopfield layer outputs
- !L_saRi_a math set|fire|tran|output ! set initial hopfield layer outputs
- ! redundant with what come later
- L___R_s_ lset out,-1
- L___R_sa @HopLp math sum|rnoise|tran ! compute new output
- L___R_sa math output ! apply it
- L___R_sa io wrstep ! pass results to user
- L___R_sa cadd recall,1 ! next recall count
- L___R_sa fcmp lflag,36 ! see if EORS or user interrupt
- L___R_s_ banz @HopLpX
- L___R_s_ eos
- L___R__a baz @HopLp ! loop some more
- L___R_sa @HopLpX lset cur,1 ! point to output layer
- L___R_sa io rcltst ! get desired output (test)
- L___R_sa math fire|sum|ce=e|tran|output|e-=w|swap ! ??? compute new output ???
- L___R_sa io write ! write out results
- !
- ! *** Learning Sequence ***
- !
- ! We are at the layer before the output layer
- L_saR___ math fire|set|tran|output|e=0 ! out_val = X
- L_saR___ lset out,0 ! error at output layer = Y (D.O)
- L_saR___ io lrnout ! get desired output
- L_saR___ math fire|backp ! err_val = Y (D.O.)
- L_saR___ lset out,-1 ! back to hidden layer
- L_saR___ math fire|sum|tran|learn ! sum_val = W * X
- ! ! dW = (Y - WX) Xt
- ! ! dW = (err_val - sum_val) * out_val
- L_saR___ math fire|output ! pass it on for posterity
- L_saR___ lset out,0 ! output layer
- L_saR___ math fire|sum|tran|output|e-=w|swap ! tidy up err & actual output
- L_saR___ io lrnrslt ! show what we found
- LisaRisa trace 0
-