private void initializeNetwork() {
        try {
            readFiles();
        } catch (IOException e) {
            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
        }

        _bpNetwork = new BPNetwork(_inputNumber);
        if (_randomOrCustomWeights.getSelection().getActionCommand().equals("Random")){
            _weightsInitializer = new RandomWeightsInitializer(new Double(_minTextField.getText()), new Double(_maxTextField.getText()));
        } else {
            _weightsInitializer = new ZeroWeightsInitializer();
        }

        int prev = _inputNumber;
        for(MyFrame myFrame : _myFrames){

            try {
                _bpNetwork.addLayer(new NetworkLayer(myFrame.getActivationFunctionType(),initializeWeights(prev, (int) myFrame.getNumberOfNeurons(), _weightsInitializer)));
            } catch (TooMuchInputLayersException e) {
                e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
            }

            prev = (int) myFrame.getNumberOfNeurons();

        }


        _learningParameters = new LearningParameters();
        _bpNetwork.setLearningParameters(_learningParameters);
    }