Bridging Optimal Control and Machine Learning