home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / e / e065 / 1.ddi / CATLRNN.INS < prev    next >
Encoding:
Text File  |  1991-08-28  |  3.8 KB  |  152 lines

  1. inst4.0        !19:30 21-Jun-88  (CatLrnN.ins)  Category Learning Network
  2. !****************************************************************
  3. !*                                *
  4. !*    Category Learning Network Builder            *
  5. !*                                *
  6. !****************************************************************
  7.  
  8. !    *** check that input / output / Hidden 1 PE count is non-zero
  9.  
  10. ?&In    1
  11. >bge    CheckOut
  12. @Err    "Category Learning Network MUST have at least one input PE"
  13. :CheckOut
  14. ?&Out    1
  15. >bge    OutOK
  16. @Err    "Category Learning Network MUST have at least one output PE"
  17. :OutOK
  18. ?&Hd1    1
  19. >bge    HidOK
  20. @Err    "Category Learning Network MUST have at least one Hidden 1 PE"
  21. :HidOK
  22. ?&Hd1    &Out
  23. >bge    HidOK2
  24. @Err    "Category Learning Network MUST have more Hidden 1 PEs than Output PEs"
  25. :HidOK2
  26.  
  27. !    *** Load the Control Strategy and LRS if needed
  28.  
  29. @LdCS    "catlrnn"        !control strategy
  30. @LdLR    "ctrpkoh"        !L/R schedule
  31.  
  32. =netn    "InstaNet (tm) Category Learning Network version 1.00 20-Jun-88"
  33. =DLnF    0            !learn  re-display off
  34. =DRcF    0            !recall re-display off
  35.  
  36. !    *** Build the Input Layer ***
  37.  
  38. @LLdf                !load default layer to mi_layer structure
  39. =LDln    "In"            !layer name
  40. =Lpes    &In            !copy # of input PEs from menu
  41. =x    100            !place to put layer on screen
  42. =y     60
  43. #Incl    "stdnwgtf.iif"        !standard # weight fields
  44. @LAdd                !add the input layer
  45.  
  46. !    *** Build the normalization Layer ***
  47.  
  48. @LLdf                !load default layer
  49. =Lpes    &In            !input PEs + 1
  50. +Lpes    1
  51. =LDln    "Norm"            !layer name
  52. =Lsum    "NormPolar"        !normalize / scale
  53. +y    70
  54. #Incl    "stdnwgtf.iif"        !standard # weight fields
  55. @LAdd
  56.  
  57. !    *** Connect it up to input layer ***
  58.  
  59. =SPEl    LayN            !normalization layer
  60. @SlPE
  61. =NPEl    0            !input layer
  62. @NrPE
  63. =cnsc    WRel
  64. =cnty    WFix
  65. =cnwt    1.0
  66. @LCCr                !connect corresponding PEs together
  67. =n0    LayN            !normalization layer
  68.  
  69. !    *** Build the Competitive Category Layer ***
  70.  
  71. @LLdf                !load default layer
  72. =Lpes    &Hd1            !hidden layer PEs
  73. =LDln    "Category"        !layer name
  74. =Lcmp    "One-Active-Highest"    !competing PEs
  75. =Llrn    "Kohonen1"        !post-normalize kohonen
  76. +y    70
  77. #Incl    "stdnwgtf.iif"        !standard # weight fields
  78. @LAdd
  79.  
  80. !    *** Connect it to the normalization layer ***
  81.  
  82. =SPEl    LayN            !current layer
  83. @SlPE
  84. =NPEl    n0            !previous layer
  85. @NrPE
  86. =cnty    WVar            !variable
  87. =cnsc    WAbs            !absolute
  88. @LCFl                !fully connect
  89. =n0    LayN            !kohonen layer
  90.  
  91. !    *** Build the output layer ***
  92.  
  93. @LLdf                !load default layer to mi_layer structure
  94. =LDln    "Out"            !layer name
  95. =Lpes    &Out            !copy # of input PEs from menu
  96. +y    70
  97. #Incl    "stdnwgtf.iif"        !standard # weight fields
  98. @LAdd                !add the output layer
  99. =n7    LayN            !save for stdprobe
  100.  
  101. !    *** Connect the output layer to the kohonen layer: Setup ***
  102.  
  103. =SPEl    LayN            !output layer
  104. =SPEn    0
  105. =NPEl    n0            !kohonen layer
  106. =NPEn    0
  107. =cnwt    1.0            !set weight to 1.0
  108. =cnty    WFix            !fixed weight
  109. =cnsc    WRel            !relative connections
  110.  
  111. !    *** Connect the Competitive layer to the Output layer
  112.  
  113. :OutCn
  114. @SlPE                !select next PE in output layer
  115. @NrPE                !select next PE in competitive layer
  116. @PCon                !connect two PEs together
  117. +SPEn    1            !next PE in output layer
  118. ?SPEn    &Out            !past the end?
  119. >blt    OutPEOK
  120. =SPEn    0            !back to start of output layer
  121. :OutPEOK
  122. +NPEn    1            !next PE in the competitive layer
  123. ?NPEn    &Hd1            !done with layer?
  124. >blt    OutCn            !no, keep going
  125.  
  126. !    *** Select Control Strategy & L/R Schedule ***
  127.  
  128. @LLsl                !load super layer
  129. =Lctl    "catlrnn"        !category learning network control strategy
  130. =Llrs    "ctrpkoh"        !L/R Schedule
  131. =Llnn    "catlrnn"        !name of learn input
  132. =Lrcn    "catlrnn"        !name of recall output
  133. #Incl    "stdioset.iif"        !standard I/O settings
  134. =Lscl    -1            !input  low-value
  135. =Loff     1            !input  high-value
  136. =Llow     0            !output low-value
  137. =Lhgh     1            !output high-value
  138. @SVsl                !save it back
  139. !
  140. =n5    0.0
  141. =n6    1.0
  142. =n4    &Out
  143. #Incl    "stdprobe.iif"        !Standard probe include file
  144. !
  145. =jogl    -.1            !lower limit for jog
  146. =jogh    +.1            !upper limit for jog
  147. =seed    257            !starting seed number
  148. @seed                !set the seed
  149. @Nini                !initialize the network
  150. @EOF
  151.  
  152.