class_docstr: Tests for Nelder-Mead optimization algorithm.
class_docstr_tok: ["Tests","for","Nelder-Mead","optimization","algorithm","."]
docstr: Can minimize a quadratic function with step size specification.
docstr_tok: ["Can","minimize","a","quadratic","function","with","step","size","specification","."]
code: def test_quadratic_bowl_with_step_sizes(self):
      """Can minimize a quadratic function with step size specification."""
      minimum = np.array([1.0, 1.0])
      scales = np.array([2.0, 3.0])
  
      def quadratic(x):
          return tf.reduce_sum(
              scales * tf.math.squared_difference(x, minimum), axis=-1
          )
  
      initial_vertex = tf.constant([1.29, -0.88])
      step_sizes = tf.constant([0.2, 1.3])
      results = self.evaluate(
          nelder_mead.minimize(
              quadratic,
              initial_vertex=initial_vertex,
              step_sizes=step_sizes,
              func_tolerance=1e-12,
              batch_evaluate_objective=True,
          )
      )
  
      self.assertTrue(results.converged)
      self.assertArrayNear(results.position, minimum, 1e-6)
  
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 3 for calling the NelderMeadTest obj's underlying member method code with example usage: obj.test_quadratic_bowl_with_step_sizes() and returns: tf