public void FindWeights(double[] tValues, double[] xValues, double learnRate, double momentum, int maxEpochs) { // Call UpdateWeights maxEpoch times. int epoch = 0; while (epoch <= maxEpochs) { double[] yValues = ComputeOutputs(xValues); UpdateWeights(tValues, learnRate, momentum); //if (epoch % 100 == 0) { Console.Write("epoch = " + epoch.ToString().PadLeft(5) + " current outputs = "); BackPropProgram.ShowVector(yValues, 2, 4, true); } ++epoch; } // Find loop. }
void testBackProp() { BackPropProgram program = new BackPropProgram (); program.run (); }