home *** CD-ROM | disk | FTP | other *** search
- inst4.0 !19:00 03-Jun-88 (bsbwh.ins) BSB Widrow-Hoff Network Builder
- !****************************************************************
- !* *
- !* Brain-State-in-a-Box (Widrow-Hoff) Network Generator *
- !* *
- !****************************************************************
-
- ! *** check that input PE count is non-zero
-
- ?&In 1
- >bge CheckOut
- @Err "Brain-State-in-a-Box MUST have at least one input PE"
- :CheckOut
-
- ! *** Load the Control Strategy and LRS if needed
-
- @LdCS "hopfield" !control strategy
- @LdLR "bsbwh" !L/R schedule
-
- =netn "InstaNet (tm) BSB Widrow-Hoff Network version 1.00 20-Jun-88"
- =DLnF 0 !learn re-display off
- =DRcF 0 !recall re-display off
-
- ! *** Build the Input Layer ***
-
- @LLdf !load default layer to mi_layer structure
- =LDln "In" !layer name
- =Lpes &In !copy # of input PEs from menu
- =Ltrn "Signum0" !transform inputs to -1,0,+1
- =x 100 !place to put layer on screen
- =y 60
- #Incl "stdnwgtf.iif" !standard # weight fields
- @LAdd !add the input layer
- =n0 LayN !track previous layer
-
- ! *** Build the Hopfield Layer ***
-
- @LLdf !start with default layer again
- =LDln "The Brain" !layer name
- =Lpes &In !desired number of PEs
- =Llrn "BSB:Widrow-Hoff" !learning rule
- =Ltrn "BSB" !transfer function
- =Llow -1.3 !low limit for outputs
- =Lhgh 1.3 !high limit for outputs
- +y 170 !up higher on display
- #Incl "stdnwgtf.iif" !standard # weight fields
- @LAdd
-
- ! *** Connect it to the input layer ***
-
- =SPEl LayN !current layer
- @SlPE
- =NPEl n0 !input layer
- @NrPE
- =cnwt 1.0 !unit weight
- =cnsc WRel
- =cnty WSet
- @LCCr !connect corresponding items
-
- ! *** Connect it to itself ***
-
- =NPEl LayN
- @NrPE
- =cnwt 0.0 !zero weights
- =cnty WVar !trainable
- =cnsc WAbs
- =cndn 50.0 !50 % interconnection
- @LCRn !Randomly connect (except diagonal)
- =n0 LayN !track previous layer
-
- ! *** Feed PEs back to themselves in this layer ***
-
- =cnwt 1.0 !unit weight modulated by mod factor
- =cnty WMod
- @LCCr
-
- ! *** Build the Output Layer ***
-
- @LLdf !start with default layer again
- =LDln "Output" !layer name
- =Lpes &In !desired number of PEs
- +y 60 !up higher on display
- #Incl "stdnwgtf.iif" !standard # weight fields
- @LAdd
- =n7 LayN !save for stdprobe
-
- ! *** Connect the output layer back to the hopfield layer ***
-
- =SPEl LayN !select output layer
- @SlPE
- =cnwt 1.0 !unit weight
- =cnty WFix !fixed
- =cnsc WRel
- @LCCr
-
- ! *** Select Control Strategy & L/R Schedule ***
-
- @LLsl !load super layer
- =Lctl "hopfield" !control strategy
- =Llrs "bsbwh" !L/R Schedule
- =Llnn "bsbwh" !name of learn input
- =Lrcn "bsbwh" !name of recall output
- #Incl "stdioset.iif" !standard I/O settings
- +Lflg LAAs !auto-associative
- =Lscl -1 !input low-value
- =Loff 1 !input high-value
- =Llow -1 !output low-value
- =Lhgh 1 !output high-value
- @SVsl !save it back
- !
- =n5 -1.0
- =n6 1.0
- =n4 &In
- #Incl "stdprobe.iif" !Standard probe include file
- !
- =jogl -.1 !lower limit for jog
- =jogh +.1 !upper limit for jog
- =seed 257 !starting seed number
- @seed !set the seed
- @Nrnd !randomize the network
- @EOF
-
-