Added gradient descent. Gradients are calculated using back propagation.