code: def test_hessian_computation(self):
      x = tf.placeholder(name="x", dtype=tf.float32, shape=(1,))
      y = tf.placeholder(name="y", dtype=tf.float32, shape=(1,))
  
      f = x**2 + y**3 + 7 * x * y
      # Gradient function:
      # [2 * x + 7 * y,
      #  3 * y ** 2 + 7 * x]
      # Hessian function:
      # [[2, 7    ]
      #  [7, 6 * y]]
      hessian, gradient = find_hessian_and_gradient(f, [x, y])
  
      session = tensorflow_session()
      hessian_output, gradient_output = session.run(
          [hessian, gradient], feed_dict={x: [1], y: [2]}
      )
  
      np.testing.assert_array_equal(gradient_output, np.array([16, 19]))
      np.testing.assert_array_equal(
          hessian_output,
          np.array(
              [
                  [2, 7],
                  [7, 12],
              ]
          ),
      )
  
file_path: neupy/tests/algorithms/gd/test_hessian.py
imports: from functools import partial
  import numpy
  import tensorflow
  from neupy import algorithms, layers
  from neupy.utils import tensorflow_session
  from neupy.algorithms.gd.hessian import find_hessian_and_gradient
  from helpers import compare_networks
  from helpers import simple_classification
  from base import BaseTestCase
label_desc: Use image node_id 2 for calling the HessianTestCase obj's underlying member method code with example usage: obj.test_hessian_computation() without return types