Compute the gradient of a function using reverse mode automatic differentiation. Output must be a 0-dimensional tensor.
Arguments
- f
(
function)- wrt
(
character()) Names of arguments to differentiate with respect to. IfNULL, compute gradients w.r.t. all differentiable arguments.