update ml_perceptron for multiple output