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: Do backward pass to get the gradient of arguments.
  
  Parameters
  ----------
  out_grads : NDArray or list of NDArray or dict of str to NDArray, optional
      Gradient on the outputs to be propagated back.
      This parameter is only needed when bind is called
      on outputs that are not a loss function.
  is_train : bool, default True
      Whether this backward is for training or inference. Note that in rare
      cases you want to call backward with is_train=False to get gradient
      during inference.
docstr_tok: ["Do","backward","pass","to","get","the","gradient","of","arguments",".","Parameters","--","--","--","--","--","out_grads",":","NDArray","or","list","of","NDArray","or","dict","of","str","to","NDArray",",","optional","Gradient","on","the","outputs","to","be","propagated","back",".","This","parameter","is","only","needed","when","bind","is","called","on","outputs","that","are","not","a","loss","function",".","is_train",":","bool",",","default","True","Whether","this","backward","is","for","training","or","inference",".","Note","that","in","rare","cases","you","want","to","call","backward","with","is_train=False","to","get","gradient","during","inference","."]
code: def backward(self, out_grads=None):
      """Do backward pass to get the gradient of arguments.
  
      Parameters
      ----------
      out_grads : NDArray or list of NDArray or dict of str to NDArray, optional
          Gradient on the outputs to be propagated back.
          This parameter is only needed when bind is called
          on outputs that are not a loss function.
      is_train : bool, default True
          Whether this backward is for training or inference. Note that in rare
          cases you want to call backward with is_train=False to get gradient
          during inference.
  
      """
      from . import autograd
  
      if out_grads is not None:
          if not isinstance(out_grads, (list, tuple)):
              out_grads = [out_grads]
          out_grads = [o.copyto(self._device) for o in out_grads]
  
      if self._requires_grad:
          if self.outputs is None:
              self.forward()
          autograd.backward(self.outputs, head_grads=out_grads)
  
          if isinstance(self._args_grad, dict):
              for k, v in self._args_grad.items():
                  try:
                      i = self._input_names.index(k)
                      if self._args[i].grad is not None:
                          v[:] = self._args[i].grad
                  # ignore provided arg grad which is not present in
                  # input_names
                  except ValueError:
                      pass
          else:
              assert isinstance(self._args_grad, (list, tuple))
              for arg, out in zip(self._args, self._args_grad):
                  if arg.grad is not None:
                      out[:] = arg.grad
  
file_path: mxnet/python/mxnet/executor.py
imports: import numpy
  from .None import ndarray
label_desc: Use image node_id 4 for calling the Executor obj's underlying member method code with example usage: obj.backward(out_grads) without return types