home *** CD-ROM | disk | FTP | other *** search
- inst4.0 ! 8/15/90
-
- !****************************************************************
- !* *
- !* Self Organizing Map *
- !* *
- !****************************************************************
- !
- ! Set counter "Aux 1" in the super layer to the number of
- ! interations between updating weights with the accumulated
- ! deltas.
-
- ! *** check that input / hidden PE count is non-zero
-
- ?&In 2
- >bge InOK
- @Err "Network MUST have at least two input PE's"
- :InOK
-
- ?&Hd1 1
- >bge Hid1OK
- @Err "Kohonen Layer MUST have at least row column of PE's"
- :Hid1OK
-
- ?&Hd2 1
- >bge Hid2OK
- @Err "Kohonen Layer MUST have at least 1 column of PE's"
- :Hid2OK
-
- ! *** Load the Control Strategy and LRS if needed
-
- @LdCS "som" !som control strategy
- @LdLR "som" !som L/R schedule
- =netn "Self Organizing Map version 1.00 15-Aug-90"
- =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 "Linear" !buffer
- =x 100 !place to put layer on screen
- =y 80
- #Incl "stdnwgtf.iif" !standard # weight fields
- @LAdd !add the input layer
-
- ! *** Build the Kohonen Layer ***
-
- @LLdf !start with default layer again
- =LDln "2-D Kohonen" !layer name
- =Lpes &Hd1 !number of rows of PEs
- *Lpes &Hd2 !times number of cols
- =n4 Lpes !save for standard instruments
- =LDnr &Hd1 !number of rows
- =LInL -0.10 !Init low value
- =LInH 0.10 !Init high value
- =Lsum "SOM" !SOM summation function
- =Llrn "SOM" !SOM learning rule
- =Lcmp "SOM" !no output function required
- =Llrs "som" !som L/R schedule
- +y 60 !up higher on display
- ?&Hd2 15 !if 15 or more cols, shrink display
- >blt small
- ?&Hd2 21
- >blt medium
- =LDsp 2 !21 or more cols
- >br small
- :medium
- =LDsp 4 !between 15 and 20 cols
- :small
- #Incl "stdnwgtf.iif" !standard # weight fields
- @LAdd !less than 15 cols
- =n7 LayN !save for stdprobe
-
- ! *** Connect Kohonen to Input Layer ***
-
- =SPEl LayN !2-D Kohonen layer
- @SlPE !select it as destination
- =NPEl 0 !previous layer
- @NrPE
- =cnwt 0.0 !connection weight
- =cnty WVar !variable
- =cnsc WAbs !absolute
- @LCFl !fully connect to input layer
- =n0 LayN !save 2-D Kohonen layer for later
-
-
- ! *** Select Control Strategy & L/R Schedule ***
-
- @LLsl !load super layer
- =Lctl "som" !self organ. map control strategy
- =Llrs "som" !self organ. map L/R Schedule
- =Llnn "train" !name of learn input
- =Lrcn "test" !name of recall output
- #Incl "stdioset.iif" !standard I/O settings
- =Lax1 1 !epoch size
- =Lscl -1.0 !input low-value
- =Loff 1.0 !input high-value
- =Llow 0.0 !output low-value
- =Lhgh 1.0 !output high-value
- =Lepc 0 !learn count=0
- @SVsl !save it back
- !
- @Nini !initialize the network
- !
- =n5 0.0
- =n6 1.0
- #Incl "stdprobe.iif" !Standard probe include file
- !
- @EOF
-
-
-
-
-
-
-