Try to implement SGD on my own