logistic_sgd.py modified