R/hessian.R
gradient.Rd
Convenience function to compute the gradient of a loss function at the current parameter values.
gradient(loss_fn, params)
A function taking a list of value parameters
A list of value objects
A numeric vector of gradients (one per parameter)