Learning and Generalization in RNNs