if (neuronProperties.hasProperty("useBias")) {
useBias = (Boolean)neuronProperties.getProperty("useBias");
}
if (useBias) {
layer.addNeuron(new BiasNeuron());
}
this.addLayer(layer);
// create layers
Layer prevLayer = layer;
//for(Integer neuronsNum : neuronsInLayers)
for(int layerIdx = 1; layerIdx < neuronsInLayers.size(); layerIdx++){
Integer neuronsNum = neuronsInLayers.get(layerIdx);
// createLayer layer
layer = LayerFactory.createLayer(neuronsNum, neuronProperties);
if ( useBias && (layerIdx< (neuronsInLayers.size()-1)) ) {
layer.addNeuron(new BiasNeuron());
}
// add created layer to network
this.addLayer(layer);
// createLayer full connectivity between previous and this layer