public MyLearning() { I = this; _form.Show(); _Learning = new KLearning((int)INPUT.MAX, 100, 100); }
// Worker thread void SearchSolution() { KLearnData[] data = KNeural.GetLearnData(); _trainer = new KLearning(data[0]._Input.Length, 100, 100); // input double[] input = new double[3]; double fixedLearningRate = learningRate / 10; double driftingLearningRate = fixedLearningRate * 9; // iterations int i = 0; // loop //while (!needToStop) foreach(KLearnData d in data) { _trainer._LearningRate = driftingLearningRate * (iterations - i) / iterations + fixedLearningRate; _trainer._LearningRadius = (double)radius * (iterations - i) / iterations; input[0] = rand.Next(256); input[1] = rand.Next(256); input[2] = rand.Next(256); //trainer.RunEpoch( _trainer.Run(d); // update map once per 50 iterations //if ((i % 10) == 9) //{ // UpdateMap(); //} // increase current iteration // i++; // set current iteration's info //currentIterationBox.Text = i.ToString(); //// stop ? //if (i >= iterations) // break; } // enable settings controls //EnableControls(true); }