Which of the following options is the method of automatically calculating the gradient.