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

  1. inst4.0 ! 02-Jun-88  (Sample.ins)  Sample 2-input Xor (backprop)
  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 "InstaNet (tm) 'Sample' Back-Propagation Network version 1.00 20-Jun-88"
  17. !=DLnF    1            !learn  re-display on
  18. =DLnN    53            !learn, re-display every 53
  19. =DRcF    1            !recall re-display on
  20. =DRcN    1            !show each recall
  21.  
  22. !    *** Build the Input Layer ***
  23.  
  24. @LLdf                !load default layer to mi_layer structure
  25. =LDln    "In"            !layer name
  26. =Lpes    2            !2 PEs for XOR
  27. =Ltrn    "Linear"        !buffer
  28. =LDsp    6            !spacing
  29. =x    100            !place to put layer on screen
  30. =y     80
  31. #Incl    "stdnwgtf.iif"        !standard # weight fields
  32. @LAdd                !add the input layer
  33. =x    130            !position hidden & output over center
  34.  
  35. !    *** Build the first hidden Layer ***
  36.  
  37. @LLdf                !start with default layer again
  38. =LDln    "H"            !layer name
  39. =Lpes    1            !One Hidden PE
  40. =Ltrn    "Sigmoid"        !transfer function
  41. =Llrn    "Delta-Rule"        !Generalized Delta learning rule
  42. +y    60            !up higher on display
  43. #Incl    "stdnwgtf.iif"        !standard # weight fields
  44. @LAdd
  45.  
  46. !    *** Connect Hidden Layer to Bias & Input Layers ***
  47.  
  48. =SPEl    1            !current layer
  49. @SlPE                !select it as destination (sb already)
  50. =NPEl    -1            !near to bias term (source)
  51. @NrPE
  52. =cnwt    1.0            !connection weight
  53. =cnty    WVar            !variable
  54. =cnsc    WAbs            !absolute
  55. @LCFl                !fully connect to bias element
  56. =NPEl    0            !input layer
  57. @NrPE
  58. @LCFl                !fully connect to input layer
  59.  
  60. !    *** Build the output layer & connect it to prior, input & bias term ***
  61.  
  62. @LLdf                !load default layer to mi_layer structure
  63. =LDln    "Out"            !layer name
  64. =Lpes    1            !copy # of input PEs from menu
  65. =Ltrn    "Sigmoid"        !transfer function
  66. =Llrn    "Delta-Rule"        !Generalized Delta learning rule
  67. +y    60
  68. #Incl    "stdnwgtf.iif"        !standard # weight fields
  69. @LAdd                !add the output layer
  70. =n7    LayN            !save for stdprobe
  71.  
  72. =SPEl    2            !current layer
  73. @SlPE                !select it as destination (sb already)
  74. =NPEl    -1            !near to bias term (source)
  75. @NrPE
  76. @LCFl                !fully connect to bias element
  77. =NPEl    1            !previous layer
  78. @NrPE
  79. @LCFl                !fully connect to input layer
  80. =NPEl    0            !input layer
  81. @NrPE
  82. @LCFl                !fully connect to input layer
  83.  
  84. !    *** Select Control Strategy & L/R Schedule ***
  85.  
  86. =LrnN    2000            !learn counter for LearnN
  87. @LLsl                !load super layer
  88. =Lctl    "backprop"        !backprop control strategy
  89. =Llrs    "backprop"        !backprop L/R Schedule
  90. =Llnn    "sample"        !name of learn input
  91. =Lrcn    "sample"        !name of recall output
  92. =Llio    321            !binary,sequential,load (0x0141)
  93. =Lrio    1137            !binary,seq,inp, des out, header (0x0471)
  94. =Lscl     0            !input  low-value
  95. =Loff     1            !input  high-value
  96. =Llow     0            !output low-value
  97. =Lhgh     1            !output high-value
  98. @SVsl                !save it back
  99. !
  100. =n5    0.0
  101. =n6    1.0
  102. =n4    1
  103. #Incl    "stdprobe.iif"        !Standard probe include file
  104. !
  105. =jogl    -.1            !lower limit for jog
  106. =jogh    +.1            !upper limit for jog
  107. =seed    257            !starting seed number
  108. @seed                !set the seed
  109. @Nini                !randomize the network
  110. @EOF
  111.