class_docstr: The base class inherited by all optimizers.
  
  Parameters
  ----------
  rescale_grad : float, optional, default 1.0
      Multiply the gradient with `rescale_grad` before updating. Often
      choose to be ``1.0/batch_size``.
  
  param_idx2name : dict from int to string, optional, default None
      A dictionary that maps int index to string name.
  
  clip_gradient : float, optional, default None
      Clip the gradient by projecting onto the box ``[-clip_gradient, clip_gradient]``.
  
  learning_rate : float, optional, default None
      The initial learning rate. If None, the optimization will use the
      learning rate from ``lr_scheduler``. If not None, it will overwrite
      the learning rate in ``lr_scheduler``. If None and ``lr_scheduler``
      is also None, then it will be set to 0.01 by default.
  
  lr_scheduler : LRScheduler, optional, default None
      The learning rate scheduler.
  
  wd : float, optional, default 0.0
      The weight decay (or L2 regularization) coefficient. Modifies objective
      by adding a penalty for having large weights.
  
  sym: Symbol, optional, default None
      The Symbol this optimizer is applying to.
  
  begin_num_update : int, optional, default 0
      The initial number of updates.
  
  multi_precision : bool, optional, default False
     Flag to control the internal precision of the optimizer.
     False: results in using the same precision as the weights (default),
     True: makes internal 32-bit copy of the weights and applies gradients
     in 32-bit precision even if actual weights used in the model have lower precision.
     Turning this on can improve convergence and accuracy when training with float16.
  
  param_dict : dict of int -> gluon.Parameter, default None
      Dictionary of parameter index to gluon.Parameter, used to lookup parameter attributes
      such as lr_mult, wd_mult, etc. param_dict shall not be deep copied.
  
  aggregate_num : int, optional, default None
      Number of weights to be aggregated in a list.
      They are passed to the optimizer for a single optimization step.
      In default, only one weight is aggregated.
      When `aggregate_num` is set to numpy.inf, all the weights are aggregated.
  
  use_fused_step : bool, optional, default None
      Whether or not to use fused kernels for optimizer.
      When use_fused_step=False, step is called,
      otherwise, fused_step is called.
  
  Properties
  ----------
  learning_rate : float
      The current learning rate of the optimizer. Given an Optimizer object
      optimizer, its learning rate can be accessed as optimizer.learning_rate.
class_docstr_tok: ["The","base","class","inherited","by","all","optimizers",".","Parameters","--","--","--","--","--","rescale_grad",":","float",",","optional",",","default","1.0","Multiply","the","gradient","with","`","rescale_grad","`","before","updating",".","Often","choose","to","be","``","1.0\/batch_size","``",".","param_idx2name",":","dict","from","int","to","string",",","optional",",","default","None","A","dictionary","that","maps","int","index","to","string","name",".","clip_gradient",":","float",",","optional",",","default","None","Clip","the","gradient","by","projecting","onto","the","box","``","[","-clip_gradient",",","clip_gradient","]","``",".","learning_rate",":","float",",","optional",",","default","None","The","initial","learning","rate",".","If","None",",","the","optimization","will","use","the","learning","rate","from","``","lr_scheduler","``",".","If","not","None",",","it","will","overwrite","the","learning","rate","in","``","lr_scheduler","``",".","If","None","and","``","lr_scheduler","``","is","also","None",",","then","it","will","be","set","to","0.01","by","default",".","lr_scheduler",":","LRScheduler",",","optional",",","default","None","The","learning","rate","scheduler",".","wd",":","float",",","optional",",","default","0.0","The","weight","decay","(","or","L2","regularization",")","coefficient",".","Modifies","objective","by","adding","a","penalty","for","having","large","weights",".","sym",":","Symbol",",","optional",",","default","None","The","Symbol","this","optimizer","is","applying","to",".","begin_num_update",":","int",",","optional",",","default","0","The","initial","number","of","updates",".","multi_precision",":","bool",",","optional",",","default","False","Flag","to","control","the","internal","precision","of","the","optimizer",".","False",":","results","in","using","the","same","precision","as","the","weights","(","default",")",",","True",":","makes","internal","32-bit","copy","of","the","weights","and","applies","gradients","in","32-bit","precision","even","if","actual","weights","used","in","the","model","have","lower","precision",".","Turning","this","on","can","improve","convergence","and","accuracy","when","training","with","float16",".","param_dict",":","dict","of","int","-",">","gluon.Parameter",",","default","None","Dictionary","of","parameter","index","to","gluon.Parameter",",","used","to","lookup","parameter","attributes","such","as","lr_mult",",","wd_mult",",","etc",".","param_dict","shall","not","be","deep","copied",".","aggregate_num",":","int",",","optional",",","default","None","Number","of","weights","to","be","aggregated","in","a","list",".","They","are","passed","to","the","optimizer","for","a","single","optimization","step",".","In","default",",","only","one","weight","is","aggregated",".","When","`","aggregate_num","`","is","set","to","numpy.inf",",","all","the","weights","are","aggregated",".","use_fused_step",":","bool",",","optional",",","default","None","Whether","or","not","to","use","fused","kernels","for","optimizer",".","When","use_fused_step=False",",","step","is","called",",","otherwise",",","fused_step","is","called",".","Properties","--","--","--","--","--","learning_rate",":","float","The","current","learning","rate","of","the","optimizer",".","Given","an","Optimizer","object","optimizer",",","its","learning","rate","can","be","accessed","as","optimizer.learning_rate","."]
docstr: Instantiates an optimizer with a given name and kwargs.
  
  .. note:: We can use the alias `create` for ``Optimizer.create_optimizer``.
  
  Parameters
  ----------
  name: str
      Name of the optimizer. Should be the name
      of a subclass of Optimizer. Case insensitive.
  
  kwargs: dict
      Parameters for the optimizer.
  
  Returns
  -------
  Optimizer
      An instantiated optimizer.
  
  Examples
  --------
  >>> sgd = mx.optimizer.Optimizer.create_optimizer('sgd')
  >>> type(sgd)
  <class 'mxnet.optimizer.SGD'>
  >>> adam = mx.optimizer.create('adam', learning_rate=.1)
  >>> type(adam)
  <class 'mxnet.optimizer.Adam'>
docstr_tok: ["Instantiates","an","optimizer","with","a","given","name","and","kwargs",".","..","note",":",":","We","can","use","the","alias","`","create","`","for","``","Optimizer.create_optimizer","``",".","Parameters","--","--","--","--","--","name",":","str","Name","of","the","optimizer",".","Should","be","the","name","of","a","subclass","of","Optimizer",".","Case","insensitive",".","kwargs",":","dict","Parameters","for","the","optimizer",".","Returns","--","--","--","-","Optimizer","An","instantiated","optimizer",".","Examples","--","--","--","--",">",">",">","sgd","=","mx.optimizer.Optimizer.create_optimizer","(","'sgd","'",")",">",">",">","type","(","sgd",")","<","class","'mxnet.optimizer.SGD","'",">",">",">",">","adam","=","mx.optimizer.create","(","'adam","'",",","learning_rate=.1",")",">",">",">","type","(","adam",")","<","class","'mxnet.optimizer.Adam","'",">"]
code: def create_optimizer(name, **kwargs):
      """Instantiates an optimizer with a given name and kwargs.
  
      .. note:: We can use the alias `create` for ``Optimizer.create_optimizer``.
  
      Parameters
      ----------
      name: str
          Name of the optimizer. Should be the name
          of a subclass of Optimizer. Case insensitive.
  
      kwargs: dict
          Parameters for the optimizer.
  
      Returns
      -------
      Optimizer
          An instantiated optimizer.
  
      Examples
      --------
      >>> sgd = mx.optimizer.Optimizer.create_optimizer('sgd')
      >>> type(sgd)
      <class 'mxnet.optimizer.SGD'>
      >>> adam = mx.optimizer.create('adam', learning_rate=.1)
      >>> type(adam)
      <class 'mxnet.optimizer.Adam'>
      """
      if name.lower() in Optimizer.opt_registry:
          return Optimizer.opt_registry[name.lower()](**kwargs)
      else:
          raise ValueError(f"Cannot find optimizer {name}")
  
imports: import warnings
  import numpy
  from ..ndarray import NDArray, zeros, cast
  from ..util import is_np_array
label_desc: Use image node_id 3 for calling the Optimizer obj's underlying member method code with example usage: obj.create_optimizer(name) and returns: Optimizer