private void loadWeightsBtn_Click(object sender, RoutedEventArgs e)
        {
            if (network == null)
            {
                weightsStatus.Content = "Stwórz najpierw sieć";
                return;
            }

            OpenFileDialog openFileDialog = new OpenFileDialog();

            openFileDialog.InitialDirectory = Environment.CurrentDirectory;
            openFileDialog.Filter           = "txt files (*.txt)|*.txt";
            openFileDialog.RestoreDirectory = true;

            if (openFileDialog.ShowDialog() != true)
            {
                weightsStatus.Content = "Wystąpił problem z wybranym plikiem";
                return;
            }
            string path = openFileDialog.FileName;

            string[] weightsString = File.ReadAllLines(path);

            if (!FormValidation.areWeightsValid(configuration.networkStructure, weightsString, out string message))
            {
                weightsStatus.Content = message;
                return;
            }
            weights = WeightsHandler.loadWeights(path);
            network.setWeights(weights);
            weightsStatus.Content = "Załadowano wagi";
            weightsLoaded         = true;
        }