public double[] getOutput(double[] inputs, boolean squash) {
        
        lastOutput = new double[weights[0].length];

        for (int neuron = 0; neuron < lastOutput.length; neuron++) {
            
            lastOutput[neuron] = 0;

            for (int input = 0; input < inputs.length; input++) {
                
                lastOutput[neuron] += inputs[input] * weights[input][neuron];
            }

            if (squash) {
                
                lastOutput[neuron] = logistic(lastOutput[neuron]);
            }
        }
        
        return lastOutput;
    }