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

  1. inst4.0        !01-Jun-89  (bsbhebb.ins)  BSB Hebbian Network Builder
  2. !****************************************************************
  3. !*                                *
  4. !*    Brain-State-in-a-Box (Hebbian) Network Generator    *
  5. !*                                *
  6. !****************************************************************
  7.  
  8. !    *** check that input PE count is non-zero
  9.  
  10. ?&In    1
  11. >bge    CheckOut
  12. @Err    "Brain-State-in-a-Box MUST have at least one input PE"
  13. :CheckOut
  14.  
  15. !    *** Load the Control Strategy and LRS if needed
  16.  
  17. @LdCS    "hopfield"        !control strategy
  18. @LdLR    "bsbhebb"        !L/R schedule
  19.  
  20. =netn    "InstaNet (tm) BSB Hebbian Network version 2.00 01-Jun-89"
  21. =DLnF    0            !learn  re-display off
  22. =DRcF    0            !recall re-display off
  23.  
  24. !    *** Build the Input Layer ***
  25.  
  26. @LLdf                !load default layer to mi_layer structure
  27. =LDln    "In"            !layer name
  28. =Lpes    &In            !copy # of input PEs from menu
  29. =Ltrn    "Signum0"        !transform inputs to -1,0,+1
  30. =x    100            !place to put layer on screen
  31. =y     60
  32. #Incl    "stdnwgtf.iif"        !standard # weight fields
  33. @LAdd                !add the input layer
  34. =n0    LayN            !track previous layer
  35.  
  36. !    *** Build the Hopfield Layer ***
  37.  
  38. @LLdf                !start with default layer again
  39. =LDln    "The Brain"        !layer name
  40. =Lpes    &In            !desired number of PEs
  41. =Llrn    "BSB:Hebb"        !learning rule
  42. =Ltrn    "BSB"            !transfer function
  43. =Llow    -1.3            !low limit for outputs
  44. =Lhgh     1.3            !high limit for outputs
  45. =LInL    0.0            !low initialization limit
  46. =LInH    0.0            !high initialization limit
  47. +y    170            !up higher on display
  48. #Incl    "stdnwgtf.iif"        !standard # weight fields
  49. @LAdd
  50.  
  51. !    *** Connect it to the input layer ***
  52.  
  53. =SPEl    LayN            !current layer
  54. @SlPE
  55. =NPEl    n0            !input layer
  56. @NrPE
  57. =cnwt    1.0            !unit weight
  58. =cnsc    WRel
  59. =cnty    WSet
  60. @LCCr                !connect corresponding items
  61.  
  62. !    *** Connect it to itself ***
  63.  
  64. =NPEl    LayN
  65. @NrPE
  66. =cnwt    0.0            !zero weights
  67. =cnty    WVar            !trainable
  68. =cnsc    WAbs
  69. =cndn    50.0            !50 % interconnection
  70. @LCRn                !Randomly connect (except diagonal)
  71. =n0    LayN            !track previous layer
  72.  
  73. !    *** Feed PEs back to themselves in this layer ***
  74.  
  75. =cnwt    1.0            !unit weight modulated by mod factor
  76. =cnty    WMod
  77. @LCCr
  78.  
  79. !    *** Build the Output Layer ***
  80.  
  81. @LLdf                !start with default layer again
  82. =LDln    "Output"        !layer name
  83. =Lpes    &In            !desired number of PEs
  84. +y    60            !up higher on display
  85. #Incl    "stdnwgtf.iif"        !standard # weight fields
  86. @LAdd
  87. =n7    LayN            !save for stdprobe
  88.  
  89. !    *** Connect the output layer back to the hopfield layer ***
  90.  
  91. =SPEl    LayN            !select output layer
  92. @SlPE
  93. =cnwt    1.0            !unit weight
  94. =cnty    WFix            !fixed
  95. =cnsc    WRel
  96. @LCCr
  97.  
  98. !    *** Select Control Strategy & L/R Schedule ***
  99.  
  100. @LLsl                !load super layer
  101. =Lctl    "hopfield"        !control strategy
  102. =Llrs    "bsbhebb"        !L/R Schedule
  103. =Llnn    "bsbhebb"        !name of learn input
  104. =Lrcn    "bsbhebb"        !name of recall output
  105. +Lflg    LAAs            !auto-associative
  106. =Lscl    -1            !input  low-value
  107. =Loff     1            !input  high-value
  108. =Llow    -1            !output low-value
  109. =Lhgh     1            !output high-value
  110. @SVsl                !save it back
  111. !
  112. =n5    -1.0
  113. =n6    1.0
  114. =n4    &In
  115. #Incl    "stdprobe.iif"        !Standard probe include file
  116. !
  117. @EOF
  118.