I Also Tried To Export First Using Standard SB:
It Showed Need Visual Basic On Machine ??
Then Tried Using SB-Prime:
I Clicked Continue And Got This:
And Then I Visited Folder Which I Choose Got Two File There:
1)Untitled.vbproj
2)UntitledModule.vb
Following Content Of Both File:
Untitled.vbproj Content:
UntitledModule.vb Content :
I Have No Knowledge About VB Maybe You Can Help
It Showed Need Visual Basic On Machine ??
Then Tried Using SB-Prime:
I Clicked Continue And Got This:
And Then I Visited Folder Which I Choose Got Two File There:
1)Untitled.vbproj
2)UntitledModule.vb
Following Content Of Both File:
Untitled.vbproj Content:
Code:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>$$(PROJECT_GUID)</ProjectGuid>
<OutputType>WinExe</OutputType>
<StartupObject>Untitled.UntitledModule</StartupObject>
<AssemblyName>Untitled</AssemblyName>
<RootNamespace>$(AssemblyName)</RootNamespace>
<FileAlignment>512</FileAlignment>
<MyType>WindowsFormsWithCustomSubMain</MyType>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<OptionExplicit>On</OptionExplicit>
<OptionCompare>Binary</OptionCompare>
<OptionStrict>Off</OptionStrict>
<OptionInfer>On</OptionInfer>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<OutputPath>bin\Debug\</OutputPath>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<DefineDebug>false</DefineDebug>
<DefineTrace>true</DefineTrace>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup>
<ItemGroup>
<Reference Include="SmallBasicLibrary">
<SpecificVersion>False</SpecificVersion>
<HintPath>$(programfiles)\\Microsoft\Small Basic\SmallBasicLibrary.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
</ItemGroup>
<ItemGroup>
<Import Include="Microsoft.VisualBasic" />
<Import Include="System" />
<Import Include="System.Diagnostics" />
<Import Include="System.Linq" />
<Import Include="System.Xml.Linq" />
<Import Include="Microsoft.SmallBasic.Library" />
</ItemGroup>
<ItemGroup>
<Compile Include="UntitledModule.vb" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
</Project>
UntitledModule.vb Content :
Code:
Module UntitledModule
Dim scale, train, path, name, inputNode, hiddenNode, outputNode, trainingData, data, i, A, B, C, epoch, input, output As Primitive
Sub Main()
scale = 100
train = true
path = Program.Directory + "\Add_ANN.txt"
If train Then
name = "Add"
inputNode = 2
hiddenNode = 3
outputNode = 1
trainingData = Program.Directory + "\" + name + ".txt"
NeuralNetwork.New(name, inputNode + "," + hiddenNode + "," + outputNode)
NeuralNetwork.BinaryOutput(name, 0, false)
data = "X"
For i = 1 To 1000
A = Microsoft.SmallBasic.Library.Math.GetRandomNumber(scale)
B = Microsoft.SmallBasic.Library.Math.GetRandomNumber(scale)
C = (A + B) / 2
data = data + (A / scale) + LDText.LF + (B / scale) + LDText.LF + (C / scale) + LDText.LF
Next
data = Text.GetSubTextToEnd(data, 2)
' The following line could be harmful and has been automatically commented.
' File.WriteContents(trainingData,data)
TextWindow.WriteLine("Training started")
epoch = NeuralNetwork.Train(name, trainingData, false)
TextWindow.WriteLine("epoch=" + epoch)
TextWindow.WriteLine("Trained=" + NeuralNetwork.Trained(name))
TextWindow.WriteLine("BinaryOutput=" + NeuralNetwork.BinaryOutput(name, 0, true))
TextWindow.WriteLine("Epoch=" + NeuralNetwork.Epochs(name, 0, true))
TextWindow.WriteLine("LearningRate=" + NeuralNetwork.LearningRate(name, 0, true))
TextWindow.WriteLine("Momentum=" + NeuralNetwork.Momentum(name, 0, true))
TextWindow.WriteLine("SigmoidResponse=" + NeuralNetwork.SigmoidResponse(name, 0, true))
TextWindow.WriteLine("ErrorRequired=" + NeuralNetwork.ErrorRequired(name, 0, true))
NeuralNetwork.Save(name, path)
Else
name = NeuralNetwork.Load(path)
End If
For i = 1 To 10
A = Microsoft.SmallBasic.Library.Math.GetRandomNumber(scale)
B = Microsoft.SmallBasic.Library.Math.GetRandomNumber(scale)
C = (A + B) / 2
input = (A / scale) + "," + (B / scale)
output = NeuralNetwork.Use(name, input)
TextWindow.WriteLine("Mean(" + A + "," + B + ") = " + C + " (" + (output * scale) + ")")
Next
End Sub
End Module
I Have No Knowledge About VB Maybe You Can Help

ZS