Optical pattern classifier with Perceptron learning