class_docstr: Tests for Nelder-Mead optimization algorithm.
class_docstr_tok: ["Tests","for","Nelder-Mead","optimization","algorithm","."]
docstr: Can minimize the absolute value function.
docstr_tok: ["Can","minimize","the","absolute","value","function","."]
code: def test_abs_function(self):
      """Can minimize the absolute value function."""
      minimum = np.array([0.0, 0.0, 0.0])
  
      def abs_func(x):
          return tf.reduce_sum(tf.abs(x), axis=-1)
  
      start = tf.constant([0.6, 1.8, -4.3], dtype=tf.float64)
      results = self.evaluate(
          nelder_mead.minimize(
              abs_func, initial_vertex=start, func_tolerance=1e-12
          )
      )
      self.assertTrue(results.converged)
      self.assertArrayNear(results.position, minimum, 1e-5)
  
imports: import numpy
  from scipy.stats import special_ortho_group
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.optimizer import nelder_mead
label_desc: Use image node_id 8 for calling the NelderMeadTest obj's underlying member method code with example usage: obj.test_abs_function() and returns: tf