added mse calculating method to neural_network