Complete the training loop: the gradient of squared error with respect to w, and the downhill update.