Including non-linearity in SGD