home *** CD-ROM | disk | FTP | other *** search
/ Robotics & Artificial Int…3 (Professional Edition) / Robotics & Artificial Intelligence Tools 2003 (Professional Edition).iso / neural network tool and application / nsinstall.exe / data1.cab / Demos_Files / Code_Generation / Embedded testing.nsm < prev    next >
Encoding:
Text File  |  2002-03-08  |  6.6 KB  |  159 lines

  1. subtitleTextBox. setText ("")
  2. mainTextBox. setText ("")
  3.  
  4. activeBreadboard. setAnimatePoint ( 20 , 210 )
  5. activeBreadboard. stampAndMove ( "Axon" , "inputAxon" )
  6. inputAxon. setRows ( 2 )
  7. activeBreadboard. setAnimatePoint ( 110 , 210 )
  8. activeBreadboard. stampAndMove ( "FullSynapse" , "hidden1Synapse" )
  9. inputAxon. connectTo ( "hidden1Synapse" )
  10. activeBreadboard. setAnimatePoint ( 200 , 210 )
  11. activeBreadboard. stampAndMove ( "TanhAxon" , "hidden1Axon" )
  12. hidden1Axon. setRows ( 2 )
  13. hidden1Synapse. connectTo ( "hidden1Axon" )
  14. activeBreadboard. setAnimatePoint ( 290 , 210 )
  15. activeBreadboard. stampAndMove ( "FullSynapse" , "outputSynapse" )
  16. hidden1Axon. connectTo ( "outputSynapse" )
  17. activeBreadboard. setAnimatePoint ( 380 , 210 )
  18. activeBreadboard. stampAndMove ( "TanhAxon" , "outputAxon" )
  19. outputSynapse. connectTo ( "outputAxon" )
  20. activeBreadboard. setAnimatePoint ( 470 , 210 )
  21. activeBreadboard. stampAndMove ( "L2Criterion" , "criterion" )
  22. outputAxon. connectTo ( "criterion" )
  23.  
  24. activeBreadboard. setAnimatePoint ( 15 , 185 )
  25. activeBreadboard. stampAndMove ( "StaticControl" , "control" )
  26. activeBreadboard. stampOnAndMove ( "BackStaticControl" , "control" )
  27. controlBackprop. setGradientClassName ( "Momentum" )
  28. controlBackprop. allocateBackpropPlane (  )
  29.  
  30. activeBreadboard. select ( "hidden1SynapseBackpropGradient" , FALSE )
  31. activeBreadboard. select ( "hidden1AxonBackpropGradient" , TRUE )
  32. activeBreadboard. select ( "outputSynapseBackpropGradient" , TRUE )
  33. activeBreadboard. select ( "outputAxonBackpropGradient" , TRUE )
  34. activeSelection. setStepSize ( 0.300000 )
  35. activeSelection. setMomentumRate ( 0.700000 )
  36.  
  37. activeBreadboard. stampOnAndMove ( "File" , "inputAxon" )
  38. file. setName ("inputFile")
  39. inputFile. setActiveAccessPoint ( "Pre-Activity" )
  40. inputFilePath = macro. pathFromMacro ( "xor.asc" )
  41. inputFile. addFile ( inputFilePath , FALSE )
  42. inputFile. setUseDefaultTranslatorForActiveFile ( FALSE , FALSE )
  43. inputFile. setActiveTranslatorName ( "ASCII - Column" , FALSE )
  44. inputFile. beginCustomizeOfActiveFile (  )
  45. inputFile. setSkipForActiveFile ( 2 , 2 )
  46. inputFile. endCustomizeOfActiveFile ( FALSE )
  47. inputFile. setNormalize ( FALSE )
  48. inputFile. translate (  )
  49. activeBreadboard. stampOnAndMove ( "File" , "criterion" )
  50. file. setName ("desiredFile")
  51. desiredFile. setActiveAccessPoint ( "Desired Signal" )
  52. desiredFilePath = macro. pathFromMacro ( "xor.asc" )
  53. desiredFile. addFile ( desiredFilePath , FALSE )
  54. desiredFile. setUseDefaultTranslatorForActiveFile ( FALSE , FALSE )
  55. desiredFile. setActiveTranslatorName ( "ASCII - Column" , FALSE )
  56. desiredFile. beginCustomizeOfActiveFile (  )
  57. desiredFile. setSkipForActiveFile ( 0 , 0 )
  58. desiredFile. setSkipForActiveFile ( 1 , 1 )
  59. desiredFile. endCustomizeOfActiveFile ( FALSE )
  60. desiredFile. setNormalize ( FALSE )
  61. desiredFile. translate (  )
  62.  
  63. activeBreadboard. stampOnAndMove ( "MatrixViewer" , "inputFile" )
  64. matrixViewer. setName ("activeInputProbe")
  65. activeInputProbe. setAutosizing ( TRUE )
  66. activeInputProbe. setEnableLabels ( TRUE )
  67. activeInputProbe. setLabelSize ( 30 )
  68. activeInputProbe. setFileForColumnHeadings ( "inputFile" )
  69. activeInputProbe. loadColumnHeadings (  )
  70. activeInputProbe. setAccessRows (FALSE)
  71. activeInputProbe. setActiveNeuron (0)
  72. activeInputProbe. setLabel ( "Input" )
  73.  
  74. activeBreadboard. stampOnAndMove ( "MatrixViewer" , "outputAxon" )
  75. matrixViewer. setName ("activeOutputProbe")
  76. activeOutputProbe. setActiveAccessPoint ( "Activity" )
  77. activeOutputProbe. setAutosizing ( TRUE )
  78. activeOutputProbe. setEnableLabels ( TRUE )
  79. activeOutputProbe. setLabelSize ( 30 )
  80. activeOutputProbe. setFileForColumnHeadings ( "desiredFile" )
  81. activeOutputProbe. loadColumnHeadings (  )
  82. activeOutputProbe. setAccessRows (FALSE)
  83. activeOutputProbe. setActiveNeuron (0)
  84. activeOutputProbe. setLabel ( "Output" )
  85.  
  86. activeBreadboard. stampOnAndMove ( "MatrixViewer" , "desiredFile" )
  87. matrixViewer. setName ("activeDesiredProbe")
  88. activeDesiredProbe. setAutosizing ( TRUE )
  89. activeDesiredProbe. setEnableLabels ( TRUE )
  90. activeDesiredProbe. setLabelSize ( 30 )
  91. activeDesiredProbe. setLabel ( "D" )
  92. activeDesiredProbe. setAccessRows (FALSE)
  93. activeDesiredProbe. setActiveNeuron (0)
  94. activeDesiredProbe. setLabel ( "Desired" )
  95.  
  96. activeBreadboard. stampOnAndMove ( "BarChart" , "criterion" )
  97. barChart. setName ("activeCostProbe")
  98. activeCostProbe. setActiveAccessPoint ( "Average Cost" )
  99. activeCostProbe. setMinNormValue ( 0.000000 )
  100. activeCostProbe. setMaxNormValue ( 0.500000 )
  101. activeCostProbe. setAutosizing ( TRUE )
  102. activeCostProbe. setEnableLabels ( TRUE )
  103. activeCostProbe. setLabelSize ( 30 )
  104. activeCostProbe. setAccessRows ( TRUE )
  105. activeCostProbe. setLabel ( "" )
  106. activeCostProbe. setWantsColumn (TRUE)
  107. activeCostProbe. setAccessRows (FALSE)
  108. activeCostProbe. setActiveNeuron (0)
  109. activeCostProbe. setLabel ( "Cost" )
  110.  
  111. activeInputProbe. tileWindow (1,4,4,4)
  112. activeOutputProbe. tileWindow (2,4,4,4)
  113. activeDesiredProbe. tileWindow (3,4,4,4)
  114. activeCostProbe. tileWindow (4,4,4,4)
  115.  
  116. activeBreadboard. lockWindowUpdate()
  117.  
  118. CreateLargeButtonMacroPath = macro. pathFromNS ( "Macros\create large button.nsm" )
  119. activeBreadboard. runMacro ( CreateLargeButtonMacroPath )
  120. controlButton. setName ( "runNetwork" )
  121. runNetwork. setText ( "Run" )
  122. runNetwork. moveTo ( 630 , 55 )
  123. ControlMacroPath = macro. pathFromMacro ( "resetRunIncreaseEpochs.nsm" )
  124. runNetwork. setMacroPath ( ControlMacroPath )
  125.  
  126. activeBreadboard. runMacro ( CreateLargeButtonMacroPath )
  127. controlButton. setName ( "stepExemplar" )
  128. stepExemplar. setText ( "Step" )
  129. stepExemplar. moveTo ( 630 , 90 )
  130. ControlMacroPath = macro. pathFromNS ( "Macros\stepExemplar.nsm" )
  131. stepExemplar. setMacroPath ( ControlMacroPath )
  132.  
  133. activeBreadboard. runMacro ( CreateLargeButtonMacroPath )
  134. controlButton. setName ( "saveWeights" )
  135. saveWeights. setText ( "Save weights" )
  136. saveWeights. moveTo ( 630 , 125 )
  137. ControlMacroPath = macro. pathFromMacro ( "saveWeights.nsm" )
  138. saveWeights. setMacroPath ( ControlMacroPath )
  139.  
  140. activeBreadboard. runMacro ( CreateLargeButtonMacroPath )
  141. controlButton. setName ( "viewWeights" )
  142. viewWeights. setText ( "View weights" )
  143. viewWeights. moveTo ( 630 , 160 )
  144. ControlMacroPath = macro. pathFromMacro ( "viewWeights.nsm" )
  145. viewWeights. setMacroPath ( ControlMacroPath )
  146.  
  147. activeBreadboard. select ( NULL , FALSE )
  148. control. setEpochs ( 100 )
  149. control. setLearning ( FALSE )
  150. control. stepEpoch (  )
  151. control. resetNetwork (  )
  152.  
  153. activeBreadboard. unlockWindowUpdate()
  154.  
  155. NextMacroPath = macro. pathFromMacro ( "Testing the compiled program with a file.nsm" )
  156. nextButton. setMacroPath ( NextMacroPath )
  157. SubtitleIndex = subtitleTextBox. setTextFromFile (TextBoxPath, SubtitleIndex)
  158. MainIndex = mainTextBox. setTextFromFile (TextBoxPath, MainIndex)
  159.