Learning to grow machine-learning models