class_docstr: Build optimizer
  Args:
      function(str): optimizer name of learning rate
      params(dict): parameters used for init the class
      regularizer (dict): parameters used for create regularization
class_docstr_tok: ["Build","optimizer","Args",":","function","(","str",")",":","optimizer","name","of","learning","rate","params","(","dict",")",":","parameters","used","for","init","the","class","regularizer","(","dict",")",":","parameters","used","for","create","regularization"]
code: def __init__(
      self,
      function="Momentum",
      params={"momentum": 0.9},
      regularizer=None,
  ):
      self.function = function
      self.params = params
      # create regularizer
      if regularizer is not None:
          mod = sys.modules[__name__]
          reg_func = regularizer["function"] + "Decay"
          del regularizer["function"]
          reg = getattr(mod, reg_func)(**regularizer)()
          self.params["regularization"] = reg
  
imports: import sys
  import math
  from paddle.optimizer.lr import LinearWarmup
  from paddle.optimizer.lr import PiecewiseDecay
  from paddle.optimizer.lr import CosineAnnealingDecay
  from paddle.optimizer.lr import ExponentialDecay
  import paddle
  import paddle.regularizer
  from copy import deepcopy
label_desc: Use image node_id 1 to create a new OptimizerBuilder object from inherited base classes: object with example: obj = OptimizerBuilder(function, params, regularizer)