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

  1. inst4.0        ! 17-4-89  boltzio.ins
  2. !****************************************************************
  3. !*                                *
  4. !*    Boltzman Network Generator - Input/Output version    *
  5. !*                                *
  6. !****************************************************************
  7.  
  8. !    *** check that input PE count is non-zero
  9.  
  10. ?&In    1
  11. >bge    CheckHid
  12. @Err    "Boltzmann I/O model MUST have at least one input PE"
  13. :CheckHid
  14. ?&Hd1    1
  15. >bge    CheckOut
  16. @Err    "Boltzmann I/O model MUST have at least one hidden PE"
  17. :CheckOut
  18. ?&Out    1
  19. >bge    OutOK
  20. @Err    "Boltzmann I/O model MUST have at least one output PE"
  21. :OutOK
  22.  
  23. !    *** Load the Control Strategy and LRS if needed
  24.  
  25. @LdCS    "boltzio"        !control strategy
  26. @LdLR    "boltzman"        !L/R schedule
  27.  
  28. =netn    "InstaNet (tm) Boltzmann Network (I/O model) version 1.00 17-04-89"
  29. =DLnF    0            !learn  re-display off
  30. =DRcF    0            !recall re-display off
  31.  
  32. !    *** Build the Input Layer ***
  33.  
  34. @LLdf                !load default layer to mi_layer structure
  35. =LDln    "In"            !layer name
  36. =Lpes    &In            !copy # of input PEs from menu
  37. =Ltrn    "StepFunction"        !transfer function
  38. =x    100            !place to put layer on screen
  39. =y     50
  40. #Incl    "stdnwgtf.iif"        !standard # weight fields
  41. @LAdd                !add the input layer
  42. =n0    LayN            !track input layer
  43.  
  44. !    *** Build the Boltzmann Layer ***
  45.  
  46. @LLdf                !start with default layer again
  47. =LDln    "Boltzmann"        !layer name
  48. =Lpes    &In            !desired number of PEs
  49. +Lpes    &Hd1
  50. +Lpes    &Out
  51. =Ltrn    "Boltzmann"        !transfer function
  52. =Llrn    "Boltzmann"        !learning rule
  53. =Llrs    "boltzman"        !L/R schedule
  54. =LInL    0.0            !low initialization limit
  55. =LInH    0.0            !high initialization limit
  56. +y    170            !up higher on display
  57. #Incl    "stdnwgtf.iif"        !standard # weight fields
  58. @LAdd
  59. =n1    LayN            !track Boltzmann layer
  60.  
  61. !    *** Connect input layer to Boltzmann layer ***
  62.  
  63. =SPEl    LayN            !current layer
  64. @SlPE
  65. =NPEl    n0            !input layer
  66. @NrPE
  67. =cnwt    1.0            !unit weight
  68. =cnsc    WRel
  69. =cnty    WSet
  70. @LCCr                !connect corresponding items
  71.  
  72. !    *** Connect Boltzmann layer to itself ***
  73.  
  74. =NPEl    LayN
  75. @NrPE
  76. =cnwt    0.0            !zero weights
  77. =cnty    WVar            !trainable
  78. =cnsc    WAbs
  79. @LCFl                !fully connect (except diagonal)
  80.  
  81. !    *** Connect the bias to the Boltzmann layer ***
  82.  
  83. =NPEl    -1
  84. @NrPE
  85. =cnwt    0.0            !zero weights
  86. =cnty    WVar            !trainable
  87. =cnsc    WAbs
  88. @LCFl                !fully connect (except diagonal)
  89.  
  90. !    *** Build the Output Layer ***
  91.  
  92. @LLdf                !start with default layer again
  93. =LDln    "Output"        !layer name
  94. =Lpes    &Out            !desired number of PEs
  95. =Ltrn    "StepFunction"        !transfer function
  96. =LInL    0.0            !low initialization limit
  97. =LInH    0.0            !high initialization limit
  98. +y    60            !up higher on display
  99. #Incl    "stdnwgtf.iif"        !standard # weight fields
  100. @LAdd
  101. =n7    LayN            !save for stdprobe
  102. =n2    LayN            !track output layer
  103.  
  104. !    *** Connect the Boltzmann layer to the Output layer ***
  105.  
  106. =SPEl    LayN            !output layer
  107. =SPEn    0
  108. =NPEl    n1            !Boltzmann layer
  109. =NPEn    &In
  110. =cnwt    1.0            !set weight to 1.0
  111. =cnty    WFix            !fixed weight
  112. =cnsc    WRel            !relative connections
  113. :B2OCn                !Boltzmann to output connections
  114. @SlPE                !select next PE in output layer
  115. @NrPE                !select next PE in Boltzmann layer
  116. @PCon                !connect two PEs together
  117. +SPEn    1            !next PE in output layer
  118. ?SPEn    &Out            !past the end?
  119. >bge    EndB20            !Connection complete
  120. +NPEn    1            !next PE in the Boltzmann layer
  121. >br    B2OCn            !next connection
  122. :EndB20
  123.  
  124. @LLsl                !load super layer
  125. =Lctl    "boltzio"        !control strategy
  126. =Llnn    "boltzman"        !name of learn input
  127. =Lrcn    "boltzman"        !name of recall output
  128. #Incl    "stdioset.iif"        !standard I/O settings
  129. =Lax1    10            !nominal number of accumulations
  130. =Lax2    10            !nominal number of firings per iteration
  131. =Lax3    20            !nominal # of iterations for collecting stats
  132. =Lscl    -1            !input  low-value
  133. =Loff     1            !input  high-value
  134. =Llow     0            !output low-value
  135. =Lhgh     1            !output high-value
  136. @SVsl                !save it back
  137. !
  138. =n5    0.0
  139. =n6    1.0
  140. =n4    &Out
  141. #Incl    "stdprobe.iif"        !Standard probe include file
  142. !
  143. =jogl    -.1            !lower limit for jog
  144. =jogh    +.1            !upper limit for jog
  145. =seed    257            !starting seed number
  146. @seed                !set the seed
  147. @Nini                !initialize the network
  148. @EOF
  149.