Modified perceptron and MLP