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: Call step to perform a single optimization update if use_fused_step is False,
   otherwise fused_step is called. Mixed precision version.
  
  Parameters
  ----------
  indices : list of int
      List of unique indices of the parameters into the individual learning rates
      and weight decays. Learning rates and weight decay may be set via `set_lr_mult()`
      and `set_wd_mult()`, respectively.
  weights : list of NDArray
      List of parameters to be updated.
  grads : list of NDArray
      List of gradients of the objective with respect to this parameter.
  states : List of any obj
      List of state returned by `create_state()`.
docstr_tok: ["Call","step","to","perform","a","single","optimization","update","if","use_fused_step","is","False",",","otherwise","fused_step","is","called",".","Mixed","precision","version",".","Parameters","--","--","--","--","--","indices",":","list","of","int","List","of","unique","indices","of","the","parameters","into","the","individual","learning","rates","and","weight","decays",".","Learning","rates","and","weight","decay","may","be","set","via","`","set_lr_mult","(",")","`","and","`","set_wd_mult","(",")","`",",","respectively",".","weights",":","list","of","NDArray","List","of","parameters","to","be","updated",".","grads",":","list","of","NDArray","List","of","gradients","of","the","objective","with","respect","to","this","parameter",".","states",":","List","of","any","obj","List","of","state","returned","by","`","create_state","(",")","`","."]
code: def update_multi_precision(self, indices, weights, grads, states):
      """Call step to perform a single optimization update if use_fused_step is False,
       otherwise fused_step is called. Mixed precision version.
  
      Parameters
      ----------
      indices : list of int
          List of unique indices of the parameters into the individual learning rates
          and weight decays. Learning rates and weight decay may be set via `set_lr_mult()`
          and `set_wd_mult()`, respectively.
      weights : list of NDArray
          List of parameters to be updated.
      grads : list of NDArray
          List of gradients of the objective with respect to this parameter.
      states : List of any obj
          List of state returned by `create_state()`.
      """
      weights_master_copy = []
      original_states = []
      grads32 = []
      for weight, grad, state in zip(weights, grads, states):
          if self.multi_precision and weight.dtype == numpy.float16:
              weights_master_copy.append(state[0])
              original_states.append(state[1])
              grads32.append(grad.astype(numpy.float32))
          else:
              weights_master_copy.append(weight)
              original_states.append(state)
              grads32.append(grad)
      self.update(
          indices, weights_master_copy, grads32, original_states
      )
      for weight_master_copy, weight in zip(
          weights_master_copy, weights
      ):
          if self.multi_precision and weight.dtype == numpy.float16:
              cast(weight_master_copy, dtype=weight.dtype, out=weight)
  
imports: import warnings
  import numpy
  from ..ndarray import NDArray, zeros, cast
  from ..util import is_np_array
label_desc: Use image node_id 10 for calling the Optimizer obj's underlying member method code with example usage: obj.update_multi_precision(indices, weights, grads, states) without return types