home *** CD-ROM | disk | FTP | other *** search
- inst4.0 !19:30 21-Jun-88 (CatLrnN.ins) Category Learning Network
- !****************************************************************
- !* *
- !* Category Learning Network Builder *
- !* *
- !****************************************************************
-
- ! *** check that input / output / Hidden 1 PE count is non-zero
-
- ?&In 1
- >bge CheckOut
- @Err "Category Learning Network MUST have at least one input PE"
- :CheckOut
- ?&Out 1
- >bge OutOK
- @Err "Category Learning Network MUST have at least one output PE"
- :OutOK
- ?&Hd1 1
- >bge HidOK
- @Err "Category Learning Network MUST have at least one Hidden 1 PE"
- :HidOK
- ?&Hd1 &Out
- >bge HidOK2
- @Err "Category Learning Network MUST have more Hidden 1 PEs than Output PEs"
- :HidOK2
-
- ! *** Load the Control Strategy and LRS if needed
-
- @LdCS "catlrnn" !control strategy
- @LdLR "ctrpkoh" !L/R schedule
-
- =netn "InstaNet (tm) Category Learning 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
- =x 100 !place to put layer on screen
- =y 60
- #Incl "stdnwgtf.iif" !standard # weight fields
- @LAdd !add the input layer
-
- ! *** Build the normalization Layer ***
-
- @LLdf !load default layer
- =Lpes &In !input PEs + 1
- +Lpes 1
- =LDln "Norm" !layer name
- =Lsum "NormPolar" !normalize / scale
- +y 70
- #Incl "stdnwgtf.iif" !standard # weight fields
- @LAdd
-
- ! *** Connect it up to input layer ***
-
- =SPEl LayN !normalization layer
- @SlPE
- =NPEl 0 !input layer
- @NrPE
- =cnsc WRel
- =cnty WFix
- =cnwt 1.0
- @LCCr !connect corresponding PEs together
- =n0 LayN !normalization layer
-
- ! *** Build the Competitive Category Layer ***
-
- @LLdf !load default layer
- =Lpes &Hd1 !hidden layer PEs
- =LDln "Category" !layer name
- =Lcmp "One-Active-Highest" !competing PEs
- =Llrn "Kohonen1" !post-normalize kohonen
- +y 70
- #Incl "stdnwgtf.iif" !standard # weight fields
- @LAdd
-
- ! *** Connect it to the normalization layer ***
-
- =SPEl LayN !current layer
- @SlPE
- =NPEl n0 !previous layer
- @NrPE
- =cnty WVar !variable
- =cnsc WAbs !absolute
- @LCFl !fully connect
- =n0 LayN !kohonen layer
-
- ! *** Build the output layer ***
-
- @LLdf !load default layer to mi_layer structure
- =LDln "Out" !layer name
- =Lpes &Out !copy # of input PEs from menu
- +y 70
- #Incl "stdnwgtf.iif" !standard # weight fields
- @LAdd !add the output layer
- =n7 LayN !save for stdprobe
-
- ! *** Connect the output layer to the kohonen layer: Setup ***
-
- =SPEl LayN !output layer
- =SPEn 0
- =NPEl n0 !kohonen layer
- =NPEn 0
- =cnwt 1.0 !set weight to 1.0
- =cnty WFix !fixed weight
- =cnsc WRel !relative connections
-
- ! *** Connect the Competitive layer to the Output layer
-
- :OutCn
- @SlPE !select next PE in output layer
- @NrPE !select next PE in competitive layer
- @PCon !connect two PEs together
- +SPEn 1 !next PE in output layer
- ?SPEn &Out !past the end?
- >blt OutPEOK
- =SPEn 0 !back to start of output layer
- :OutPEOK
- +NPEn 1 !next PE in the competitive layer
- ?NPEn &Hd1 !done with layer?
- >blt OutCn !no, keep going
-
- ! *** Select Control Strategy & L/R Schedule ***
-
- @LLsl !load super layer
- =Lctl "catlrnn" !category learning network control strategy
- =Llrs "ctrpkoh" !L/R Schedule
- =Llnn "catlrnn" !name of learn input
- =Lrcn "catlrnn" !name of recall output
- #Incl "stdioset.iif" !standard I/O settings
- =Lscl -1 !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 &Out
- #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
- @Nini !initialize the network
- @EOF
-
-