private void learnGrossberg() throws IOException, InvalidDimensionsException {
        readFiles();

        if (_cpNetwork == null){
            try {
                _cpNetwork = new CPNetwork(_inputNumber,new Integer(_rowsTextField.getText()), new Integer(_columnsTextField.getText()),
                        _outputNumber, _weightsInitializer, ActivationFunctionType.valueOf(_activationFunctionType.getSelection().getActionCommand()));
            } catch (TooMuchInputLayersException e) {
                e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
            }
        }

        LearningParameters learningParameters = new LearningParameters();
        _cpNetwork.setLearningParameters(learningParameters);

        _cpNetwork.setKohonenLearningMode(false);
        _cpNetwork.setGrossbergLearningMode(true);
        learningParameters.setAlpha(new Double(_alfa.getText()));
        for(int i=0; i < new Integer(_iterationCount.getText());i++){
            int j=0;
            for(double[] input : _inputs){
                _cpNetwork.setInputs(input);
                _cpNetwork.setExpectedOutput(_outputs.get(j));
                _cpNetwork.calculate();
                j++;
            }
        }
    }