Mathematical model

First, for each node \( i \) in the first hidden layer, we calculate a weighted sum \( u_i^1 \) of the input coordinates \( x_j \), $$ \begin{equation} u_i^1 = \sum_{j=1}^2 w_{ij}^1 x_j + b_i^1 \tag{3} \end{equation} $$ This value is the argument to the activation function \( f_1 \) of each neuron \( i \), producing the output \( y_i^1 \) of all neurons in layer 1, $$ \begin{equation} y_i^1 = f_1(u_i^1) = f_1\left(\sum_{j=1}^2 w_{ij}^1 x_j + b_i^1\right) \tag{4} \end{equation} $$ where we assume that all nodes in the same layer have identical activation functions, hence the notation \( f_l \) $$ \begin{equation} y_i^l = f_l(u_i^l) = f_l\left(\sum_{j=1}^{N_{l-1}} w_{ij}^l y_j^{l-1} + b_i^l\right) \tag{5} \end{equation} $$ where \( N_l \) is the number of nodes in layer \( l \). When the output of all the nodes in the first hidden layer are computed, the values of the subsequent layer can be calculated and so forth until the output is obtained.