Perceptron Learning Rule
You don't want to follow those rules.
You have your matrix of observations and you multiply by a matrix of weights, in which, initially al the weights are assigned randomly.
A matrix of weights is composed in this way: each column represents a neuron and the rows the weight to which you multiply your features.
If you have k layers you'll have k matrices of weights.
At each iteration, what the DL framework allows you to do (You don't want to it manually), compares the real target to your predicted and computes a cost function(How far is the predicted from real?). Derivative is then computed respect to the weights, it is demonstrated that the direction of the steepest descent is obtained by updating the weights by a value of $W_i = W_i + \Delta W_i$ where: $\Delta W_i = n(d_i - y_i)$. It goes in this fashion by a number of iterations you defined.
I hope I gave you a hint to understand how it works.