Optimal Control Theoretic Neural Optimizer: From Backpropagation to Dynamic Programming