Implements the Gradient Descent Algorithm for Artificial Neural Networks