private int CalculateNetworkSize(ActivationNetwork activationNetwork)
{
// caclculate total amount of weight in neural network
int networkSize = 0;
for (int i = 0; i < network.Layers.Length; i++)
{
Layer layer = network.Layers[i];
for (int j = 0; j < layer.Neurons.Length; j++)
{
// sum all weights and threshold
networkSize += layer.Neurons[j].Weights.Length + 1;
}
}
return networkSize;
}