When creating a network it is necessary to define how many layers, neurons and connections it should have. If the network become too large, the ANN will have difficulties learning and when it does learn it will tend to over-fit resulting in poor generalization. If the network becomes too small, it will not be able to represent the rules needed to learn the problem and it will never gain a sufficiently low error rate.
The number of hidden layers is also important. Generally speaking, if the problem is simple it is often enough to have one or two hidden layers, but as the problems get more complex, so does the need for more layers.
One way of getting a large network which is not too complex, is to adjust the connection_rate parameter given to
fann_create
. If this parameter is 0.5, the constructed network will have the same amount of
neurons, but only half as many connections. It is difficult to say which problems this approach is useful for, but if you have a problem which can be
solved by a fully connected network, then it would be a good idea to see if it still works after removing half the connections.