  We propose a general framework for machine learning based optimization under
uncertainty. Our approach replaces the complex forward model by a surrogate,
which is learned simultaneously in a one-shot sense when solving the optimal
control problem. Our approach relies on a reformulation of the problem as a
penalized empirical risk minimization problem for which we provide a
consistency analysis in terms of large data and increasing penalty parameter.
To solve the resulting problem, we suggest a stochastic gradient method with
adaptive control of the penalty parameter and prove convergence under suitable
assumptions on the surrogate model. Numerical experiments illustrate the
results for linear and nonlinear surrogate models.
