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

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