private void EntrenamientoCompleto(IAsyncResult result)
 {
     if (result.AsyncState is TrainingCallBack)
     {
         TrainingCallBack TR        = (TrainingCallBack)result.AsyncState;
         bool             isSuccess = TR.EndInvoke(res);
         SetBotones(true);
         timer1.Stop();
         t = 1;
     }
 }
        private void TraningCompleted(IAsyncResult result)
        {
            if (result.AsyncState is TrainingCallBack)
            {
                TrainingCallBack TR = (TrainingCallBack)result.AsyncState;

                bool isSuccess = TR.EndInvoke(res);
                if (isSuccess)
                {
                    _viewModel.LogTextBox     += "- Nauka sieci zakończona pomyśnie\r\n";
                    _viewModel.TrainingSuccess = true;
                }

                else
                {
                    _viewModel.LogTextBox += "- Błąd - przekroczona maksymalna iteracja\r\n";
                }
            }
        }
        private void TraningCompleted(IAsyncResult result)
        {
            if (result.AsyncState is TrainingCallBack)
            {
                TrainingCallBack TR        = (TrainingCallBack)result.AsyncState;
                bool             isSuccess = TR.EndInvoke(res);
                if (isSuccess)
                {
                    UpdateState("Completed Training Process Successfully.");
                    //
                }
                else
                {
                    UpdateState("Training Process is Aborted or Exceed Maximum Iteration.");
                    //BtnTrain.Enabled = true;
                }

                TimerTime.Stop();
            }
        }
        private void TrainingCompleted(IAsyncResult result)
        {
            if (result.AsyncState is TrainingCallBack)
            {
                TrainingCallBack TR = (TrainingCallBack)result.AsyncState;

                bool isSuccess = TR.EndInvoke(res);
                if (isSuccess)
                {
                    UpdateState("Apmācība veiksmīgi pabeigta. \r\n");
                }
                else
                {
                    UpdateState("Training Process is Aborted or Exceed Maximum Iteration\r\n");
                }

                SetButtons(true);
                timer1.Stop();
            }
        }
Exemple #5
0
        private void TraningCompleted(IAsyncResult result)
        {
            if (result.AsyncState is TrainingCallBack)
            {
                TrainingCallBack TR = (TrainingCallBack)result.AsyncState;

                bool isSuccess = TR.EndInvoke(res);
                if (isSuccess)
                {
                    UpdateState("Completed Training Process Successfully\r\n");
                    timer1.Stop();
                    // closeButton.Enabled = true;
                    //SaveFileDialog FD = new SaveFileDialog();
                    //FD.Filter = "Network File(*.net)|*.net";
                    //if (FD.ShowDialog() == DialogResult.OK)
                    //{
                    try
                    {
                        string savenet = positivePath + "\\network.net";
                        neuralNetwork.SaveNetwork(savenet);
                        UpdateProgressBar("completed");
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show(ex.ToString());
                    }

                    //}
                    //FD.Dispose();
                }
                else
                {
                    UpdateState("Training Process is Aborted or Exceed Maximum Iteration\r\n");
                    timer1.Stop();
                }
            }
        }