returns the gradient of the sigmoid function