Learning to Generalize Across Long-Horizon Tasks from Human Demonstrations