09-30-2024, 05:38 PM
litDev,
Here's a snippet:
name="XorANN"
'where=program.Directory
'textwindow.writeline(where)
Data=NeuralNetwork.Load("c:\temp\"+name+".txt")
Data=NeuralNetwork.BinaryOutput("c:\temp\"+name+".txt",0,"False")
TextWindow.WriteLine(Data)
If I comment out the second line for data, TextWindow.Writeline prints the first data with the correct name. So, that means it did find the ANN. If I uncomment the second line, textwindow.writeline says "Error a neural network with that name doesn't exist.
I don't understand why that would be! As it just found it. Your thoughts?
ILspy just shows this:
// SmallBasicANN.NeuralNetwork
/// <summary>
/// Get or set wether the data is binary "True" or not.
/// </summary>
/// <param name="Name">The ANN name.</param>
/// <param name="Value">The requested data.</param>
/// <param name="Get">"True" to get the requested data.</param>
/// <returns>An error message or the requested data.</returns>
public static Primitive BinaryOutput(Primitive Name, Primitive Value, Primitive Get)
{
ANN aNN;
if (!NeuralNetwork.dictionaryANN.TryGetValue(Name, out aNN))
{
return "Error: a neural network with that name doesn't exist";
}
if (!Get)
{
aNN.BinaryOutput = Value;
}
return aNN.BinaryOutput;
}
JR
Here's a snippet:
name="XorANN"
'where=program.Directory
'textwindow.writeline(where)
Data=NeuralNetwork.Load("c:\temp\"+name+".txt")
Data=NeuralNetwork.BinaryOutput("c:\temp\"+name+".txt",0,"False")
TextWindow.WriteLine(Data)
If I comment out the second line for data, TextWindow.Writeline prints the first data with the correct name. So, that means it did find the ANN. If I uncomment the second line, textwindow.writeline says "Error a neural network with that name doesn't exist.
I don't understand why that would be! As it just found it. Your thoughts?
ILspy just shows this:
// SmallBasicANN.NeuralNetwork
/// <summary>
/// Get or set wether the data is binary "True" or not.
/// </summary>
/// <param name="Name">The ANN name.</param>
/// <param name="Value">The requested data.</param>
/// <param name="Get">"True" to get the requested data.</param>
/// <returns>An error message or the requested data.</returns>
public static Primitive BinaryOutput(Primitive Name, Primitive Value, Primitive Get)
{
ANN aNN;
if (!NeuralNetwork.dictionaryANN.TryGetValue(Name, out aNN))
{
return "Error: a neural network with that name doesn't exist";
}
if (!Get)
{
aNN.BinaryOutput = Value;
}
return aNN.BinaryOutput;
}
JR