desc.derivatives.FiniteDiffDerivative.compute_vjp
- classmethod FiniteDiffDerivative.compute_vjp(fun, argnum, v, *args, **kwargs)Source
Compute v.T * df/dx.
- Parameters:
fun (callable) – function to differentiate
argnum (int or tuple) – arguments to differentiate with respect to
v (array-like or tuple of array-like) – tangent vectors. Should be one for each output of fun
args (tuple) – arguments passed to fun
kwargs (dict) – keyword arguments passed to fun
- Returns:
vjp (array-like) – Vector v times Jacobian, summed over different argnums