public void setInputs(double[] inputs) throws InvalidDimensionsException {
        if(inputs.length != neurons.size()){
            throw new InvalidDimensionsException();
        }
        Iterator inputNeuronsIterator = neurons.iterator();

        if(normalize){

            double norm = 0.0;
            for(double input :inputs){
                norm += input*input;
            }
            norm = Math.sqrt(norm);

            if(norm > 0){
                for(double input: inputs){
                    ((Input)inputNeuronsIterator.next()).setInput(input/norm);
                }
            }else{
                for(double input: inputs){
                    ((Input)inputNeuronsIterator.next()).setInput(input);
                }
            }
        }else{

            for(double input: inputs){
                ((Input)inputNeuronsIterator.next()).setInput(input);
            }
        }
    }