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

  1. inst3.0        !15:00 4-Mar-91  (dbd.ins) Delta-Bar-Delta(tanh) InstaNet
  2. !****************************************************************
  3. !*                                *
  4. !*    Delta-Bar-Delta Network Builder                *
  5. !*                                *
  6. !****************************************************************
  7.  
  8. !    *** check that input / output PE count is non-zero
  9.  
  10. ?&In    1
  11. >bge    CheckOut
  12. @Err    "Delta-Bar-Delta MUST have at least one input PE"
  13. :CheckOut
  14. ?&Out    1
  15. >bge    OutOK
  16. @Err    "Delta-Bar-Delta MUST have at least one output PE"
  17. :OutOK
  18. ?&Hd1    1
  19. >bge    HidOK
  20. @Err    "Delta-Bar-Delta MUST have at least one Hidden Layer 1 PE"
  21. :HidOK
  22.  
  23. !    *** Load the Control Strategy and LRS
  24.  
  25. @LdCS    "dbd"            !control strategy
  26. @LdLR    "dbd"            !L/R schedule
  27.  
  28. =netn    "InstaNet (tm) Delta-Bar-Delta Network version 1.10 4-March-91"
  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    "Linear"        !buffer
  38. =x    100            !place to put layer on screen
  39. =y     80
  40. #Incl    "stdnwgtf.iif"        !standard # weight fields
  41. @LAdd                !add the input layer
  42.  
  43. !    *** Build the first hidden Layer ***
  44.  
  45. @LLdf                !start with default layer again
  46. =LDln    "Hidden 1"        !layer name
  47. =Lpes    &Hd1            !Proper number of PEs
  48. =Ltrn    "TanH"          !transfer function
  49. =Llrn    "Delta-Bar-Delta"    !DBD learning rule
  50. +y    60            !up higher on display
  51. #Incl    "stdnwgtf.iif"        !standard # weight fields
  52. @LAdd
  53.  
  54. !    *** Connect Hidden Layer to Bias & Input Layers ***
  55.  
  56. =SPEl    LayN            !current layer
  57. @SlPE                !select it as destination (sb already)
  58. =NPEl    -1            !near to bias term (source)
  59. @NrPE
  60. =cnwt    1.0            !connection weight
  61. =cnty    WVar            !variable
  62. =cnsc    WAbs            !absolute
  63. @LCFl                !fully connect to bias element
  64. =NPEl    0            !input layer
  65. @NrPE
  66. @LCFl                !fully connect to input layer
  67. =n0    LayN            !save current layer for later
  68.  
  69. !    *** Build the Second hidden Layer ***
  70.  
  71. ?&Hd2    0
  72. >ble    NoHid2            !skip adding second hidden layer
  73.  
  74. @LLdf                !start with default layer again
  75. =LDln    "Hidden 2"        !layer name
  76. =Lpes    &Hd2            !Proper number of PEs
  77. =Ltrn    "TanH"          !transfer function
  78. =Llrn    "Delta-Bar-Delta"    !DBD learning rule
  79. +y    60            !up higher on display
  80. #Incl    "stdnwgtf.iif"        !standard # weight fields
  81. @LAdd
  82.  
  83. !    *** Connect Hidden Layer 2 to Bias & Input Layers ***
  84.  
  85. =SPEl    LayN            !current layer
  86. @SlPE                !select it as destination (sb already)
  87. =NPEl    -1            !near to bias term (source)
  88. @NrPE
  89. @LCFl                !fully connect to bias element
  90. =NPEl    n0            !previous layer
  91. @NrPE
  92. @LCFl                !fully connect to input layer
  93. =n0    LayN            !save current layer for later
  94. :NoHid2
  95.  
  96. !    *** Build the output layer & connect it to prior layer & bias term ***
  97.  
  98. @LLdf                !load default layer to mi_layer structure
  99. =LDln    "Out"            !layer name
  100. =Lpes    &Out            !copy # of input PEs from menu
  101. =n4    Lpes            !save for standard instruments
  102. =Ltrn    "TanH"          !transfer function
  103. =Llrn    "Delta-Bar-Delta"    !DBD learning rule
  104. +y    60
  105. #Incl    "stdnwgtf.iif"        !standard # weight fields
  106. @LAdd                !add the output layer
  107. =n7    LayN            !save for stdprobe
  108.  
  109. =SPEl    LayN            !current layer
  110. @SlPE                !select it as destination (sb already)
  111. =NPEl    -1            !near to bias term (source)
  112. @NrPE
  113. @LCFl                !fully connect to bias element
  114. =NPEl    n0            !previous layer
  115. @NrPE
  116. @LCFl                !fully connect to input layer
  117.  
  118. !    *** Select Control Strategy & L/R Schedule ***
  119.  
  120. @LLsl                !load super layer
  121. =Lctl    "dbd"            !delta-bar-delta control strategy
  122. =Llrs    "dbd"            !delta-bar-delta L/R Schedule
  123. =Llnn    "train"            !name of learn input
  124. =Lrcn    "test"            !name of recall output
  125. #Incl    "stdioset.iif"        !standard I/O settings
  126. =Lscl     -1.0            !input  low-value
  127. =Loff     1.0            !input  high-value
  128. =Llow     -0.8            !output low-value
  129. =Lhgh     0.8            !output high-value
  130. @SVsl                !save it back
  131. =jogl    -.1            !lower limit for jog
  132. =jogh    +.1            !upper limit for jog
  133. =seed    257            !starting seed number
  134. @seed                !set the seed
  135. @Nini                !initialize the network
  136. !
  137. =n5     -1.0
  138. =n6    1.0
  139. #Incl    "stdprobe.iif"        !Standard probe include file
  140. !
  141. @EOF
  142.