Beispiel #1
0
 private void DigitRecognizer_TrainComplete(object source, DigitRecognizer.TrainProgressChangedEventArgs e)
 {
     try
     {
         this.Dispatcher.Invoke(
             () => ToggleNNControls(true)
             );
     }
     catch
     {
         Thread.CurrentThread.Abort();
     }
 }
Beispiel #2
0
 private void DigitRecognizer_TrainProgressChanged(object source, DigitRecognizer.TrainProgressChangedEventArgs e)
 {
     try
     {
         labelStatus.Dispatcher.Invoke(
             () => labelStatus.Content = "Training iteration: " + (e.iteration > 0 ? e.iteration - 1 : e.iteration) + " / 10, Current cost: " + e.cost.ToString("#.##")
             );
     }
     catch
     {
         Thread.CurrentThread.Abort();
     }
 }