fixed sgd test script