The train() method in the feedforward network needs to be rewritten.