code: def compute_jacobian(values, parameters):
      """
      Compute Jacobian matrix.
  
      Parameters
      ----------
      values : Tensorfow variable
          Computed MSE for each sample separately.
  
      parameters : list of Tensorfow variable
          Neural network parameters (e.g. weights, biases).
  
      Returns
      -------
      Tensorfow variable
      """
      values_shape = tf.shape(values)
      n_samples = values_shape[0]
  
      def compute_gradient_per_value(index, result):
          gradients = tf.gradients(values[index], parameters)
          full_gradient = make_single_vector(gradients)
          return index + 1, result.write(index, full_gradient)
  
      _, jacobian = tf.while_loop(
          lambda index, _: index < n_samples,
          compute_gradient_per_value,
          [
              tf.constant(0, tf.int32),
              tf.TensorArray(tf.float32, size=n_samples),
          ],
      )
  
      return jacobian.stack()
  
file_path: neupy/neupy/algorithms/gd/lev_marq.py
imports: import numpy
  import tensorflow
  from neupy.utils import tensorflow_session, flatten, function_name_scope, make_single_vector
  from neupy.core.properties import BoundedProperty, ChoiceProperty, WithdrawProperty
  from neupy.algorithms import BaseOptimizer
  from neupy.algorithms.gd import objectives
  from neupy.utils.tf_utils import setup_parameter_updates
label_desc: Use image node_id 1 for calling a global function with example usage: compute_jacobian(values, parameters) and returns: jacobian, unknown,  result