class_docstr: Executor is the object providing efficient symbolic and imperative graph
  execution and optimization.
  
  Examples
  --------
  >>> # typical approach to create an executor is to bind symbol
  >>> a = mx.sym.var('a')
  >>> b = mx.sym.var('b')
  >>> c = 2 * a + b
  >>> texec = c._bind(mx.cpu(), {'a': mx.nd.array([1,2]), 'b':mx.nd.array([2,3])})
class_docstr_tok: ["Executor","is","the","object","providing","efficient","symbolic","and","imperative","graph","execution","and","optimization",".","Examples","--","--","--","--",">",">",">","#","typical","approach","to","create","an","executor","is","to","bind","symbol",">",">",">","a","=","mx.sym.var","(","'","a","'",")",">",">",">","b","=","mx.sym.var","(","'","b","'",")",">",">",">","c","=","2","*","a","+","b",">",">",">","texec","=","c._bind","(","mx.cpu","(",")",",","{","'","a","'",":","mx.nd.array","(","[","1,2","]",")",",","'","b","'",":","mx.nd.array","(","[","2,3","]",")","}",")"]
docstr: Copy parameters from arg_params, aux_params into executor's internal array.
  
  Parameters
  ----------
  arg_params : dict of str to NDArray
      Parameters, dict of name to NDArray of arguments.
  
  aux_params : dict of str to NDArray, optional
      Parameters, dict of name to NDArray of auxiliary states.
  
  allow_extra_params : boolean, optional
      Whether allow extra parameters that are not needed by symbol.
      If this is True, no error will be thrown when arg_params or aux_params
      contain extra parameters that is not needed by the executor.
  
  Raises
  ------
  ValueError
      If there is additional parameters in the dict but ``allow_extra_params=False``.
  
  Examples
  --------
  >>> # set parameters with existing model checkpoint
  >>> model_prefix = 'mx_mlp'
  >>> sym, arg_params, aux_params = mx.model.load_checkpoint(model_prefix, 0)
  >>> texec.copy_params_from(arg_params, aux_params)
docstr_tok: ["Copy","parameters","from","arg_params",",","aux_params","into","executor","'s","internal","array",".","Parameters","--","--","--","--","--","arg_params",":","dict","of","str","to","NDArray","Parameters",",","dict","of","name","to","NDArray","of","arguments",".","aux_params",":","dict","of","str","to","NDArray",",","optional","Parameters",",","dict","of","name","to","NDArray","of","auxiliary","states",".","allow_extra_params",":","boolean",",","optional","Whether","allow","extra","parameters","that","are","not","needed","by","symbol",".","If","this","is","True",",","no","error","will","be","thrown","when","arg_params","or","aux_params","contain","extra","parameters","that","is","not","needed","by","the","executor",".","Raises","--","--","--","ValueError","If","there","is","additional","parameters","in","the","dict","but","``","allow_extra_params=False","``",".","Examples","--","--","--","--",">",">",">","#","set","parameters","with","existing","model","checkpoint",">",">",">","model_prefix","=","'mx_mlp'",">",">",">","sym",",","arg_params",",","aux_params","=","mx.model.load_checkpoint","(","model_prefix",",","0",")",">",">",">","texec.copy_params_from","(","arg_params",",","aux_params",")"]
code: def copy_params_from(
      self, arg_params, aux_params=None, allow_extra_params=False
  ):
      """Copy parameters from arg_params, aux_params into executor's internal array.
  
      Parameters
      ----------
      arg_params : dict of str to NDArray
          Parameters, dict of name to NDArray of arguments.
  
      aux_params : dict of str to NDArray, optional
          Parameters, dict of name to NDArray of auxiliary states.
  
      allow_extra_params : boolean, optional
          Whether allow extra parameters that are not needed by symbol.
          If this is True, no error will be thrown when arg_params or aux_params
          contain extra parameters that is not needed by the executor.
  
      Raises
      ------
      ValueError
          If there is additional parameters in the dict but ``allow_extra_params=False``.
  
      Examples
      --------
      >>> # set parameters with existing model checkpoint
      >>> model_prefix = 'mx_mlp'
      >>> sym, arg_params, aux_params = mx.model.load_checkpoint(model_prefix, 0)
      >>> texec.copy_params_from(arg_params, aux_params)
      """
      for name, array in arg_params.items():
          if name in self.arg_dict:
              dst = self.arg_dict[name]
              array.astype(dst.dtype).copyto(dst)
          elif not allow_extra_params:
              raise ValueError(
                  f'Find name "{name}" that is not in the arguments'
              )
  
      if aux_params is None:
          return
  
      for name, array in aux_params.items():
          if name in self.aux_dict:
              dst = self.aux_dict[name]
              array.astype(dst.dtype).copyto(dst)
          elif not allow_extra_params:
              raise ValueError(
                  f"Find name {name} that is not in the auxiliary states"
              )
  
file_path: mxnet/python/mxnet/executor.py
imports: import numpy
  from .None import ndarray
label_desc: Use image node_id 12 for calling the Executor obj's underlying member method code with example usage: obj.copy_params_from(arg_params, aux_params, allow_extra_params) without return types