Training TLUs: the perceptron rule