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

  1. inst4.0        !19:00 03-Jun-88  (bsbwh.ins)  BSB Widrow-Hoff Network Builder
  2. !****************************************************************
  3. !*                                *
  4. !*    Brain-State-in-a-Box (Widrow-Hoff) 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    "bsbwh"            !L/R schedule
  19.  
  20. =netn    "InstaNet (tm) BSB Widrow-Hoff Network version 1.00 20-Jun-88"
  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:Widrow-Hoff"    !learning rule
  42. =Ltrn    "BSB"            !transfer function
  43. =Llow    -1.3            !low limit for outputs
  44. =Lhgh     1.3            !high limit for outputs
  45. +y    170            !up higher on display
  46. #Incl    "stdnwgtf.iif"        !standard # weight fields
  47. @LAdd
  48.  
  49. !    *** Connect it to the input layer ***
  50.  
  51. =SPEl    LayN            !current layer
  52. @SlPE
  53. =NPEl    n0            !input layer
  54. @NrPE
  55. =cnwt    1.0            !unit weight
  56. =cnsc    WRel
  57. =cnty    WSet
  58. @LCCr                !connect corresponding items
  59.  
  60. !    *** Connect it to itself ***
  61.  
  62. =NPEl    LayN
  63. @NrPE
  64. =cnwt    0.0            !zero weights
  65. =cnty    WVar            !trainable
  66. =cnsc    WAbs
  67. =cndn    50.0            !50 % interconnection
  68. @LCRn                !Randomly connect (except diagonal)
  69. =n0    LayN            !track previous layer
  70.  
  71. !    *** Feed PEs back to themselves in this layer ***
  72.  
  73. =cnwt    1.0            !unit weight modulated by mod factor
  74. =cnty    WMod
  75. @LCCr
  76.  
  77. !    *** Build the Output Layer ***
  78.  
  79. @LLdf                !start with default layer again
  80. =LDln    "Output"        !layer name
  81. =Lpes    &In            !desired number of PEs
  82. +y    60            !up higher on display
  83. #Incl    "stdnwgtf.iif"        !standard # weight fields
  84. @LAdd
  85. =n7    LayN            !save for stdprobe
  86.  
  87. !    *** Connect the output layer back to the hopfield layer ***
  88.  
  89. =SPEl    LayN            !select output layer
  90. @SlPE
  91. =cnwt    1.0            !unit weight
  92. =cnty    WFix            !fixed
  93. =cnsc    WRel
  94. @LCCr
  95.  
  96. !    *** Select Control Strategy & L/R Schedule ***
  97.  
  98. @LLsl                !load super layer
  99. =Lctl    "hopfield"        !control strategy
  100. =Llrs    "bsbwh"            !L/R Schedule
  101. =Llnn    "bsbwh"            !name of learn input
  102. =Lrcn    "bsbwh"            !name of recall output
  103. #Incl    "stdioset.iif"        !standard I/O settings
  104. +Lflg    LAAs            !auto-associative
  105. =Lscl    -1            !input  low-value
  106. =Loff     1            !input  high-value
  107. =Llow    -1            !output low-value
  108. =Lhgh     1            !output high-value
  109. @SVsl                !save it back
  110. !
  111. =n5    -1.0
  112. =n6    1.0
  113. =n4    &In
  114. #Incl    "stdprobe.iif"        !Standard probe include file
  115. !
  116. =jogl    -.1            !lower limit for jog
  117. =jogh    +.1            !upper limit for jog
  118. =seed    257            !starting seed number
  119. @seed                !set the seed
  120. @Nrnd                !randomize the network
  121. @EOF
  122.  
  123.