End-to-End Stochastic Optimization with Energy-Based Model