class_docstr: Base class for computing Hessian-vector product.
  
  Args:
      num_slices (int): Hessian-vector product function's inputs will be
          divided into num_slices and then averaged together to improve
          performance.
class_docstr_tok: ["Base","class","for","computing","Hessian-vector","product",".","Args",":","num_slices","(","int",")",":","Hessian-vector","product","function","'s","inputs","will","be","divided","into","num_slices","and","then","averaged","together","to","improve","performance","."]
docstr: Build the evaluation function.  # noqa: D202, E501 # https://github.com/PyCQA/pydocstyle/pull/395.
  
  Args:
      inputs (tuple[numpy.ndarray]): Function f will be evaluated on
          these inputs.
  
  Returns:
      function: It can be called to get the final result.
docstr_tok: ["Build","the","evaluation","function",".","#","noqa",":","D202",",","E501","#","https",":","\/\/github.com\/PyCQA\/pydocstyle\/pull\/395",".","Args",":","inputs","(","tuple","[","numpy.ndarray","]",")",":","Function","f","will","be","evaluated","on","these","inputs",".","Returns",":","function",":","It","can","be","called","to","get","the","final","result","."]
code: def build_eval(self, inputs):
      """Build the evaluation function.  # noqa: D202, E501 # https://github.com/PyCQA/pydocstyle/pull/395.
  
      Args:
          inputs (tuple[numpy.ndarray]): Function f will be evaluated on
              these inputs.
  
      Returns:
          function: It can be called to get the final result.
  
      """
  
      def _eval(v):
          """The evaluation function.
  
          Args:
              v (numpy.ndarray): The vector to be multiplied with Hessian.
  
          Returns:
              numpy.ndarray: The product of Hessian of function f and v.
  
          """
          xs = tuple(self._target.flat_to_params(v))
          ret = (
              _sliced_fn(self._hvp_fun["f_hx_plain"], self._num_slices)(
                  inputs, xs
              )
              + self._reg_coeff * v
          )
          return ret
  
      return _eval
  
imports: import abc
  from dowel import logger
  import numpy
  import tensorflow
  from garage.tf import compile_function, flatten_tensor_variables, new_tensor_like
  from garage.tf.optimizers._dtypes import LazyDict
label_desc: Use image node_id 3 for calling the HessianVectorProduct obj's underlying member method code with example usage: obj.build_eval(inputs) and returns: _eval, ret