vjp#

ivy.vjp(func, *primals)[source]#

Compute a (reverse-mode) vector-Jacobian product of func.

Parameters:
  • func (callable) – Function to be differentiated.

  • primals – sequence of primal values at which the Jacobian of func should be evaluated.

Returns:

ret – The output of func evaluated at primals. And a function from a cotangent vector representing the vector-Jacobian product of fun evaluated at primals.