In many applications, prediction problems are used to forecast inputs for downstream optimization tasks. The goal is to make forecasts that will minimize the final task-based objective. We focus on two-stage stochastic linear optimization tasks with uncertain parameters, which are intractable for most existing end-to-end methods. The primary difficulty in minimizing the task-based objective is in differentiating the output with respect to the forecasted parameters. In this paper, we propose a neural network approach that can learn to approximately solve the underlying linear optimization formulation, and ensure its output satisfies the feasibility constraints. We show this method can solve important supply chain problems, not only tractably, but also more accurately than existing approaches.