adhoc_opt A ad-hoc implementation of stochastic gradient descent for better speed with customized convergence monitoring