@Override
public INeuralNetwork build(int[] topology, Activations[] functions) {
if (topology.length != functions.length) {
throw new IllegalArgumentException("Layers & functions - different length");
}
INeuralNetwork network = new NeuralNetwork();
ILayer layer;
for (int i = 0; i < topology.length; i++) {
layer = new Layer(topology[i], getActivation(functions[i]));
network.addLayer(layer);
}
network.generateWeights();
return network;
}