home *** CD-ROM | disk | FTP | other *** search
- inst4.0 !01-Jun-88 (hopfield.ins) Hopfield Network Builder
- !****************************************************************
- !* *
- !* Hopfield Network Generator *
- !* *
- !****************************************************************
-
- ! *** check that input PE count is non-zero
-
- ?&In 1
- >bge CheckOut
- @Err "Hopfield MUST have at least one input PE"
- :CheckOut
-
- ! *** Load the Control Strategy and LRS if needed
-
- @LdCS "hopfield" !control strategy
- @LdLR "hopfield" !L/R schedule
-
- =netn "InstaNet (tm) Hopfield Network version 2.00 01-Jun-89"
- =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 "StepFunction" !transfer function
- =x 100 !place to put layer on screen
- =y 50
- #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 "Hopfield" !layer name
- =Lpes &In !desired number of PEs
- =Ltrn "StepFunction" !transfer function
- =Llrn "Hopfield" !learning rule
- =LInL 0.0 !low initialization limit
- =LInH 0.0 !high initialization limit
- +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
- @LCFl !fully connect (except diagonal)
- =n0 LayN !track previous layer
-
- ! *** 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 "hopfield" !L/R Schedule
- =Llnn "hopfield" !name of learn input
- =Lrcn "hopfield" !name of recall output
- +Lflg LAAs !auto-associative
- =Lscl 0 !input low-value
- =Loff 1 !input high-value
- =Llow 0 !output low-value
- =Lhgh 1 !output high-value
- @SVsl !save it back
- !
- =n5 0.0
- =n6 1.0
- =n4 &In
- #Incl "stdprobe.iif" !Standard probe include file
- !
-
- @EOF
-