A non-working version of regular gradient descent algorithm for pmf