private void buttonTrain_Click(object sender, EventArgs e)
        {
            SetBotones(false);
            ResetManual.Reset();

            TrainingCallBack TR = new TrainingCallBack(NeuralNet.Train);

            res     = TR.BeginInvoke(LlamadaAsincrona, TR);
            DTStart = DateTime.Now;
            timer1.Start();
            try
            {
                t    = 0;
                hilo = new Thread(delegate()
                {
                    ReconocimientoRedPatron patron__ = new ReconocimientoRedPatron(ReconocimientoRedPatronEnRed);
                    while (true)
                    {
                        for (int i = 0; i < ImgBits.Count; i++)
                        {
                            Bitmap bit = ImgBits[i];
                            try
                            {
                                this.Invoke(patron__, new object[] { ImgAbuscar, bit, t });
                            }
                            catch { }
                            System.Threading.Thread.Sleep(20);
                        }
                    }
                });
                hilo.Start();
            }
            catch { }
        }
        public void StartTraining()
        {
            _neuralNetwork.ViewModel = _viewModel;
            TrainingCallBack TR = new TrainingCallBack(_neuralNetwork.Train);

            res = TR.BeginInvoke(asyCallBack, TR);
        }
Ejemplo n.º 3
0
        private void cmd_trainNet_Click(object sender, EventArgs e)
        {
            UpdateState("Apmācības process sākts..\r\n");
            SetButtons(false);
            ManualReset.Reset();

            TrainingCallBack TR = new TrainingCallBack(neuralNetwork.Train);

            res     = TR.BeginInvoke(asyCallBack, TR);
            DTStart = DateTime.Now;
            timer1.Start();
        }
Ejemplo n.º 4
0
 private void BtnTrain_Click(object sender, EventArgs e)
 {
     if (BtnTrain.Text == "Stop")
     {
         Manager.StopImageTraining = true;
         BtnTrain.Text             = "Start Training";
     }
     else
     {
         UpdateState("Began Training Process..\r\n");
         //BtnTrain.Enabled = false;
         BtnTrain.Text = "Stop";
         ManualReset.Reset();
         TrainingCallBack TR = new TrainingCallBack(Manager.DoTrainingCycle);
         res     = TR.BeginInvoke(asyCallBack, TR);
         DTStart = DateTime.Now;
         TimerTime.Start();
     }
 }
Ejemplo n.º 5
0
        private void TrainProcess_Load(object sender, EventArgs e)
        {
            InitializeSettings();

            GenerateTrainingSet();
            CreateNeuralNetwork();

            asyCallBack = new AsyncCallback(TraningCompleted);
            ManualReset = new ManualResetEvent(false);


            progressBar1.Style = ProgressBarStyle.Marquee;
            progressBar1.MarqueeAnimationSpeed = 10;

            UpdateState("Began training process...\n");

            ManualReset.Reset();

            TrainingCallBack TR = new TrainingCallBack(neuralNetwork.Train);

            res     = TR.BeginInvoke(asyCallBack, TR);
            DTStart = DateTime.Now;
            timer1.Start();
        }