use Reverse.gradWith rather than gradWith' in stochasticGradientDescent