torch.autograd.functional.hessian
torch.autograd.functional.hessian(func, inputs, create_graph=False, strict=False, vectorize=False, outer_jacobian_strategy='reverse-mode')
Function that computes the Hessian of a given scalar function.
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".

  * **create_graph** (*bool**, **optional*) -- If "True", the
    Hessian will be computed in a differentiable manner. Note that
    when "strict" is "False", the result can not require gradients
    or be disconnected from the inputs. Defaults to "False".

  * **strict** (*bool**, **optional*) -- If "True", an error will
    be raised when we detect that there exists an input such that
    all the outputs are independent of it. If "False", we return a
