class_docstr: Optimizer that implements the YellowFin algorithm.
  
  See [Zhang et. al., 2017](https://arxiv.org/abs/1706.03471) for details.
docstr: YellowFin auto-tuning optimizer based on momentum SGD.
  
  Returns:
    YF ops
      (Curvature range,
       Grad_variance,
       Dist_to_opt,
       Single-Step,
       Auto-Tuning)
docstr_tok: ["YellowFin","auto-tuning","optimizer","based","on","momentum","SGD",".","Returns",":","YF","ops","(","Curvature","range",",","Grad_variance",",","Dist_to_opt",",","Single-Step",",","Auto-Tuning",")"]
code: def _yellowfin(self):
      """YellowFin auto-tuning optimizer based on momentum SGD.
  
      Returns:
        YF ops
          (Curvature range,
           Grad_variance,
           Dist_to_opt,
           Single-Step,
           Auto-Tuning)
      """
      # List for the returned Operations.
      yellowfin_ops = []
  
      # Curvature range ops.
      curv_range_ops = self._curvature_range()
      yellowfin_ops += curv_range_ops
      # Estimate of gradient Variance ops.
      grad_var_ops = self._grad_variance()
      yellowfin_ops += grad_var_ops
      # Distance to optimum ops.
      dist_to_opt_ops = self._dist_to_opt()
      yellowfin_ops += dist_to_opt_ops
  
      # Single-Step: minimizes the surrogate for the expected
      # squared distance from the optimum of a local quadratic
      # approximation after a single step while keeping all directions in the
      # robust region.
      self._mu = tf.identity(
          tf.cond(
              self._do_tune, self._get_mu_tensor, lambda: self._mu_var
          )
      )
      with tf.control_dependencies([self._mu]):
          self._lr = tf.identity(
              tf.cond(
                  self._do_tune,
                  self._get_lr_tensor,
                  lambda: self._lr_var,
              )
          )
  
      # Tune learning rate and momentum.
      with tf.control_dependencies([self._mu, self._lr]):
          self._mu = (
              self._beta * self._mu_var + (1 - self._beta) * self._mu
          )
          self._lr = (
              self._beta * self._lr_var + (1 - self._beta) * self._lr
          )
          yellowfin_ops.append(tf.assign(self._mu_var, self._mu))
          yellowfin_ops.append(tf.assign(self._lr_var, self._lr))
  
      yellowfin_ops = tf.group(*yellowfin_ops)
      return yellowfin_ops
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import tensorflow.compat.v1
label_desc: Use image node_id 10 for calling the YellowFinOptimizer obj's underlying member method code with example usage: obj._yellowfin() and returns: yellowfin_ops