where a ij and b ij are the output and bias of the i-th neuron in the j-th layer, a k(j-1) and w ki(j-1) are the output and the weight of neuron from the previous layer, respectively, n (j-1) is the number of neurons in the layer (j-1) and f j is the activation or transfer function of the j-th layer.