public void initialize(int numInputs, int numHiddenNodes, int numHiddenLayers) throws Exception {
		Layer inputLayer = new Layer();
		inputLayer.ID = 0;
		
		Layer[] hiddenLayers = new Layer[numHiddenLayers];
		Layer outputLayer = new Layer();
		outputLayer.ID = numHiddenLayers + 1;
		
		if (numHiddenLayers == 0) {
			throw new Exception("You must specify at least one hidden layer");
		}
		
		// Initialize all layers, and set prev/next fields
		for (int i = 0; i < numHiddenLayers; ++i) {
			hiddenLayers[i] = new Layer();
			hiddenLayers[i].ID = i + 1;
			if (i == 0) {
				hiddenLayers[0].setPrev(inputLayer);
				inputLayer.setNext(hiddenLayers[0]);
			}
			else if (i > 0) {
				hiddenLayers[i].setPrev(hiddenLayers[i-1]);
				hiddenLayers[i-1].setNext(hiddenLayers[i]);
			}
			if (i == numHiddenLayers - 1) {
				outputLayer.setPrev(hiddenLayers[i]);
				hiddenLayers[i].setNext(outputLayer);
			}
		}
		
		for (int i = 0; i < numInputs; ++i) {
			inputLayer.add(new InputLayerNeuron(inputLayer));
		}
		
		for (int i = 0; i < numHiddenNodes; ++i) {
			for (int j = 0; j < numHiddenLayers; ++j) {
				hiddenLayers[j].add(new HiddenLayerNeuron(hiddenLayers[j]));
			}
		}
		
//		bias node
		inputLayer.add(new InputLayerNeuron(inputLayer));
		
		for (int i = 0; i < numHiddenLayers; ++i) {
			hiddenLayers[i].assignRandomWeightsToHere();
		}
		
		outputLayer.add(new OutputLayerNeuron(outputLayer));
		outputLayer.assignRandomWeightsToHere();
		
		layers.add(inputLayer);
		layers.addAll(Arrays.asList(hiddenLayers));
		layers.add(outputLayer);
	}