internal AI_Output RunAI(AI_InputRequest inputRequest) { var executer = new NeuralNetworkExecutor(_neuralNetwork); var output = executer.Run(AiHelper.AiInputToDoubleArray(inputRequest.Input)); var aiOutput = AiHelper.DoubleArrayToAiOutput(output); return(aiOutput); }
public void TestRun() { var layers = new[] { 2, 3, 2 }; var neuralNetwork = new NeuralNetwork(layers); var executer = new NeuralNetworkExecutor(neuralNetwork); var input = new[] { 1.0, 0.0 }; var output = executer.Run(input); Assert.AreEqual(2, output.Length); }