Learning high-dimensional targets by two-parameter models and gradient flow