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

  1. inst4.0        ! Feb 7 1989
  2. !****************************************************************
  3. !*                                *
  4. !*    "Sample" Back-Propagation Network Builder        *
  5. !*                                *
  6. !****************************************************************
  7. !
  8. !    This script builds a back-propagation network designed
  9. !    to solve the exclusive "OR" problem with two inputs.
  10.  
  11. !    *** Load the Control Strategy and LRS if needed
  12.  
  13. @LdCS    "backprop"        !control strategy
  14. @LdLR    "backprop"        !L/R schedule
  15.  
  16. =netn "Sample InstaNet with Instruments"
  17. =DRcF    1            !recall re-display on
  18. =DRcN    1            !show each recall
  19.  
  20. !    *** Build the Input Layer ***
  21.  
  22. @LLdf                !load default layer to mi_layer structure
  23. =LDln    "In"            !layer name
  24. =Lpes    2            !2 PEs for XOR
  25. =Ltrn    "Linear"        !buffer
  26. =LDsp    6            !spacing
  27. =x    100            !place to put layer on screen
  28. =y     80
  29. #Incl    "stdnwgtf.iif"        !standard # weight fields
  30. @LAdd                !add the input layer
  31. =x    130            !position hidden & output over center
  32.  
  33. !    *** Build the first hidden Layer ***
  34.  
  35. @LLdf                !start with default layer again
  36. =LDln    "H"            !layer name
  37. =Lpes    1            !One Hidden PE
  38. =Ltrn    "Sigmoid"        !transfer function
  39. =Llrn    "Delta-Rule"        !Generalized Delta learning rule
  40. +y    60            !up higher on display
  41. #Incl    "stdnwgtf.iif"        !standard # weight fields
  42. @LAdd
  43.  
  44. !    *** Connect Hidden Layer to Bias & Input Layers ***
  45.  
  46. =SPEl    1            !current layer
  47. @SlPE                !select it as destination (sb already)
  48. =NPEl    -1            !near to bias term (source)
  49. @NrPE
  50. =cnwt    1.0            !connection weight
  51. =cnty    WVar            !variable
  52. =cnsc    WAbs            !absolute
  53. @LCFl                !fully connect to bias element
  54. =NPEl    0            !input layer
  55. @NrPE
  56. @LCFl                !fully connect to input layer
  57.  
  58. !    *** Build the output layer & connect it to prior, input & bias term ***
  59.  
  60. @LLdf                !load default layer to mi_layer structure
  61. =LDln    "Out"            !layer name
  62. =Lpes    1            !copy # of input PEs from menu
  63. =Ltrn    "Sigmoid"        !transfer function
  64. =Llrn    "Delta-Rule"        !Generalized Delta learning rule
  65. +y    60
  66. #Incl    "stdnwgtf.iif"        !standard # weight fields
  67. @LAdd                !add the output layer
  68.  
  69. =SPEl    2            !current layer
  70. @SlPE                !select it as destination (sb already)
  71. =NPEl    -1            !near to bias term (source)
  72. @NrPE
  73. @LCFl                !fully connect to bias element
  74. =NPEl    1            !previous layer
  75. @NrPE
  76. @LCFl                !fully connect to input layer
  77. =NPEl    0            !input layer
  78. @NrPE
  79. @LCFl                !fully connect to input layer
  80.  
  81. !    *** Select Control Strategy & L/R Schedule ***
  82.  
  83. =LrnN    4000            !learn counter for LearnN
  84. @LLsl                !load super layer
  85. =Lctl    "backprop"        !backprop control strategy
  86. =Llrs    "backprop"        !backprop L/R Schedule
  87. =Llnn    "sample"        !name of learn input
  88. =Lrcn    "sample"        !name of recall output
  89. =Llio    321            !binary,sequential,load (0x0141)
  90. =Lrio    1137            !binary,seq,inp, des out, header (0x0471)
  91. =Lax1    4            !Set epoch for instruments
  92. =Lscl     0            !input  low-value
  93. =Loff     1            !input  high-value
  94. =Llow     0            !output low-value
  95. =Lhgh     1            !output high-value
  96. @SVsl                !save it back
  97.  
  98. !    *** Build Instruments - all use the same probe ***
  99.  
  100. @ILdD                !load default instrument
  101. =x    200            !place to put instrument on screen
  102. =y     50
  103. =ITit    "RMS Error"        !Instrument title
  104. =IEpc    1            !RMS over an epoch
  105. =Ihgt    64
  106. =Iwdt    400
  107. =Ivmn    0.0
  108. =Ivmx    1.0
  109. =Ignx    100            !100 graph points
  110. =Inpl    2            !2 plots
  111. =IGC0    11            !Plot colors
  112. =IGC1    13
  113. =IGCF    12            !Foreground color
  114. =IGCB    8            !Background color
  115. =IRcA    0            !Not active in recall
  116. =ILDv    10            !Every 10 iterations
  117. =IPrb    "Output"        !Point to default probe
  118. =ICAc    1            !Convergence criterion active
  119. =ICTh    0.05            !Convergence Threshold
  120. @IAdd                !Now create instrument
  121.  
  122. @ILdD                !load default instrument
  123. =x    200            !place to put instrument on screen
  124. =y    218
  125. =ITit    "Weight Histogram"    !Instrument title
  126. =IGTy    "Hist"            !Graph type
  127. =IGVr    "Weight"        !Variable
  128. =ITMd    0            !No transformation
  129. =Ihgt    64
  130. =Iwdt    400
  131. =Ivmn    -15.0
  132. =Ivmx    15.0
  133. =Ignx    100            !100 bins
  134. =IGC0    11            !Plot colors
  135. =IGC1    11
  136. =IGCF    12            !Foreground color
  137. =IGCB    8            !Background color
  138. =IRcA    0            !Not active in recall
  139. =ILDv    120            !Every 120 iterations
  140. =IPrb    "Output"        !Point to probe
  141. @IAdd                !Now create instrument
  142.  
  143. @ILdD                !load default instrument
  144. =x    200            !place to put instrument on screen
  145. =y    124
  146. =ITit    "RMS Weights"        !Instrument title
  147. =IGVr    "Weight"        !Variable
  148. =IEpc    1            !RMS over an epoch
  149. =Ihgt    64
  150. =Iwdt    400
  151. =Ivmn    0.0
  152. =Ivmx    10.0
  153. =Ignx    100            !100 graph points
  154. =Inpl    2            !2 plots
  155. =IGC0    11            !Plot colors
  156. =IGC1    13
  157. =IGCF    12            !Foreground color
  158. =IGCB    8            !Background color
  159. =IRcA    0            !Not active in recall
  160. =ILDv    10            !Every 10 iterations
  161. =IPrb    "Output"        !Point to probe
  162. @IAdd                !Now create instrument
  163.  
  164. =jogl    -.1            !lower limit for jog
  165. =jogh    +.1            !upper limit for jog
  166. =seed    257            !starting seed number
  167. @seed                !set the seed
  168. @Nrnd                !randomize the network
  169. =DLnF    0            !kill redraw flag durint learning
  170. =DRcF    0            !ditto recall
  171. @EOF
  172.