Balancing memorization and generalization in RNNs for high performance brain-machine Interfaces