If the configuration of the weights of a neuron seems simple, the configuration of a network of neurons is more delicate. With a great number of neurons and layers, the problem is very complex. The solution consists in carrying out a learning with samples.
Two approaches are generally used: supervised learning and unsupervised learning.