Stochastic Gradient Descent algorithm does not work properly (Python) I need to write SGD-Perceptron for digit recognition according to this guidelines: