Learning with Algorithmic Supervision via Continuous Relaxations