With the error of the final layer known, the weights and biases may be progressively refined through calculus. Using the chain rule, the partial derivative of the loss function over the layer weights and the partial derivate of the loss function of the biases may be calculated (equations 3.6, and 3.7) .