debug gradient descent