R/backward.R
gradient.Rd
Transform a function to its gradient.
gradient(f, wrt = NULL) value_and_gradient(f, wrt = NULL)
(function) Function to compute the gradient of.
function
(character) Names of the arguments to compute the gradient with respect to.
character
value_and_gradient(): Returns both the value and the gradient
value_and_gradient()