def _compute_nary_hessian_vector_product(self, gradients, arguments):
    "Returns a function accepting `2 * len(arguments)` arguments to\n        compute a Hessian-vector product of a multivariate function.\n\n        Notes\n        -----\n        The implementation is based on TensorFlow's '_hessian_vector_product'\n        function in 'tensorflow.python.ops.gradients_impl'.\n        "
    argument_types = [argument.type() for argument in arguments]
    try:
        Rop = T.Rop(gradients, arguments, argument_types)
    except NotImplementedError:
        proj = [T.sum((gradient * disconnected_grad(argument_type))) for (gradient, argument_type) in zip(gradients, argument_types)]
        proj_grad = [T.grad(proj_elem, arguments, disconnected_inputs='ignore', return_disconnected='None') for proj_elem in proj]
        proj_grad_transpose = map(list, zip(*proj_grad))
        proj_grad_stack = [T.stacklists([c for c in row if (c is not None)]) for row in proj_grad_transpose]
        Rop = [T.sum(stack, axis=0) for stack in proj_grad_stack]
    return self._compile_function_without_warnings(list(itertools.chain(arguments, argument_types)), Rop)
Returns a function accepting `2 * len(arguments)` arguments to
compute a Hessian-vector product of a multivariate function.

Notes
-----
The implementation is based on TensorFlow's '_hessian_vector_product'
function in 'tensorflow.python.ops.gradients_impl'.
def _compute_nary_hessian_vector_product(self, gradients, arguments):
    "Returns a function accepting `2 * len(arguments)` arguments to\n        compute a Hessian-vector product of a multivariate function.\n\n        Notes\n        -----\n        The implementation is based on TensorFlow's '_hessian_vector_product'\n        function in 'tensorflow.python.ops.gradients_impl'.\n        "
    argument_types = [argument.type() for argument in arguments]
    try:
        Rop = T.Rop(gradients, arguments, argument_types)
    except NotImplementedError:
        proj = [T.sum((gradient * disconnected_grad(argument_type))) for (gradient, argument_type) in zip(gradients, argument_types)]
        proj_grad = [T.grad(proj_elem, arguments, disconnected_inputs='ignore', return_disconnected='None') for proj_elem in proj]
        proj_grad_transpose = map(list, zip(*proj_grad))
        proj_grad_stack = [T.stacklists([c for c in row if (c is not None)]) for row in proj_grad_transpose]
        Rop = [T.sum(stack, axis=0) for stack in proj_grad_stack]
    return self._compile_function_without_warnings(list(itertools.chain(arguments, argument_types)), Rop)