torch.autograd.functional.hvp
torch.autograd.functional.hvp(func, inputs, v=None, create_graph=False, strict=False)
Function that computes the dot product between the Hessian of a
   given scalar function and a vector "v" at the point given by the
   inputs.
Parameters:
      * func (function) -- a Python function that takes Tensor
        inputs and returns a Tensor with a single element.
  * **inputs** (*tuple of Tensors** or **Tensor*) -- inputs to the
    function "func".

  * **v** (*tuple of Tensors** or **Tensor*) -- The vector for
    which the Hessian vector product is computed. Must be the same
    size as the input of "func". This argument is optional when
    "func"'s input contains a single element and (if it is not
    provided) will be set as a Tensor containing a single "1".

  * **create_graph** (*bool**, **optional*) -- If "True", both the
    output and result will be computed in a differentiable way.
