An Analytical Theory of Curriculum Learning in Teacher-Student Networks