Example #1
0
        private void button3_Click(object sender, EventArgs e)
        {
            //train network
            listBox1.Items.Add("Training begin...\n");

            //the network was not loaded, is new, so we need to train
            _neuronalNetwork = new NeuronalNetwork(540, 10, 4);
            _trainAnn        = new TrainerAnn(ref _neuronalNetwork, _readFile, false);
            _trainAnn.DoTrain(5000);
            listBox1.Items.Add("Training complete...\n");

            //_trainAnn.TestRun(3000);
            //listBox1.Text += "Testing data complete...\n";
        }
Example #2
0
 private void button2_Click(object sender, EventArgs e)
 {
     //load neuronal network from file
     using (var fileDialog = new OpenFileDialog())
     {
         fileDialog.Title       = "Please select a file";
         fileDialog.Multiselect = false;
         fileDialog.Filter      = "NET|*.net";
         DialogResult dr = fileDialog.ShowDialog();
         if (dr == DialogResult.OK)
         {
             string fileName = Path.GetFileName(fileDialog.FileName);
             _neuronalNetwork = Serializer.LoadNetwork(fileName);
             _trainAnn        = new TrainerAnn(ref _neuronalNetwork, _readFile, true);
             listBox1.Items.Add("Load Network complete...\n");
             button5.Enabled = true; // dam enable la butonul de save
         }
     }
 }