Derivatives of Stochastic Gradient Descent