Completed exercise 5: Training Neural Networks