Updated L-BFGS-based MLP trainer