Skip to contents

Transform a function to its gradient.

Usage

gradient(f, wrt = NULL)

value_and_gradient(f, wrt = NULL)

Arguments

f

(function)
Function to compute the gradient of.

wrt

(character)
Names of the arguments to compute the gradient with respect to.

Functions

  • value_and_gradient(): Returns both the value and the gradient