class_docstr: Base class of solver.
class_docstr_tok: ["Base","class","of","solver","."]
docstr: Get the optimizer.
docstr_tok: ["Get","the","optimizer","."]
code: def get_optimizer(self):
      """Get the optimizer."""
      optconf = self.config["solver"]["optimizer"]
      method = optconf["name"]
      learning_rate = self.get_learning_rate()
      if method == "adadelta":
          opt = tf.train.AdadeltaOptimizer(learning_rate)
      elif method == "adam":
          opt = tf.train.AdamOptimizer(learning_rate)
      elif method == "adagrad":
          opt = tf.train.AdagradOptimizer(learning_rate)
      elif method == "momentum":
          opt = tf.train.MomentumOptimizer(learning_rate, momentum=0.9)
      elif method == "rmsprop":
          opt = tf.train.RMSPropOptimizer(learning_rate)
      elif method == "gradientdecent":
          opt = tf.train.GradientDescentOptimizer(learning_rate)
      elif method == "lazyadam":
          opt = tfa.optimizers.LazyAdam(learning_rate)
      elif method == "weightedadam":
          weight_decay = self.config["solver"]["optimizer"][
              "weight_decay"
          ]
          opt = tfa.optimizers.AdamW(
              weight_decay=weight_decay, learning_rate=learning_rate
          )
      elif method == "yellowfin":
          opt = optimizer.YFOptimizer(learning_rate)
      else:
          raise ValueError("Not support optimizer: {}".format(method))
  
      return opt
  
imports: import abc
  import math
  import delta.compat
  import tensorflow_addons
  from absl import logging
  from delta import utils
  from delta.utils import optimizer
  from delta.utils.register import registers
label_desc: Use image node_id 8 for calling the Solver obj's underlying member method code with example usage: obj.get_optimizer() and returns: opt