changed sgd.py