serialization stackoverflow fix

I was just going off of this implementation: https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/linear_model/sgd_fast.pyx#L222.