Dynamics of Generalization in Linear Perceptrons