Adjoint-operators and non-adiabatic learning algorithms in neural networks