LinearLayer inputLayer = new LinearLayer();
inputLayer.setRows(numAttribs);
nnLayers.add(inputLayer);
// Create network structure iteratively
Layer lastLayer = inputLayer;
for (int i = 0; i < hiddenLayers; i++) {
Layer currentLayer = NNLayer.newInstance(layer);
currentLayer.setRows(hiddenLayerRows);
Synapse currentSynapse = NNSynapse.newInstance(synapse);
lastLayer.addOutputSynapse(currentSynapse);
currentLayer.addInputSynapse(currentSynapse);
nnLayers.add(currentLayer);
lastLayer = currentLayer;
}
Synapse synapseToOutLayer = NNSynapse.newInstance(synapse);