private void learnBtn_Click(object sender, RoutedEventArgs e)
        {
            if (network == null)
            {
                learningStatus.Content = "Stwórz najpierw sieć";
                return;
            }
            if (!weightsLoaded)
            {
                learningStatus.Content = "Załaduj najpierw wagi";
                return;
            }
            if (learning == null)
            {
                learningStatus.Content = "Załaduj najpierw próbki uczące";
                return;
            }
            if (!FormValidation.isBetaValid(betaBox, out string betaMessage))
            {
                learningStatus.Content = betaMessage;
                return;
            }
            if (!FormValidation.isLearningFactorValid(learningFactorBox, out string LearningFactorMessage))
            {
                learningStatus.Content = LearningFactorMessage;
                return;
            }
            if (!FormValidation.isEpochAmountValid(epochAmountBox, out string epochMessage))
            {
                learningStatus.Content = epochMessage;
                return;
            }
            epochAmount    = int.Parse(epochAmountBox.Text);
            beta           = double.Parse(betaBox.Text);
            learningFactor = double.Parse(learningFactorBox.Text);

            BackgroundWorker worker = new BackgroundWorker();

            worker.WorkerReportsProgress = true;
            worker.ProgressChanged      += worker_ProgressChanged;
            worker.DoWork += worker_DoWork;

            if (worker.IsBusy == true)
            {
                learningStatus.Content = "Poczekaj na zakończenie procesu uczenia";
                return;
            }
            progressBar.Visibility = Visibility.Visible;
            worker.RunWorkerAsync();
        }