class_docstr: Interface between a MXNet model and a Thinc Model. This container is
  *not* a Thinc Model subclass itself.
class_docstr_tok: ["Interface","between","a","MXNet","model","and","a","Thinc","Model",".","This","container","is","*","not","*","a","Thinc","Model","subclass","itself","."]
docstr: Pass the inputs through to the underlying MXNet model, keeping
  track of which items in the input are tensors requiring gradients.
  If the model returns a single value, it is converted into a one-element
  tuple. Return the outputs and a callback to backpropagate.
docstr_tok: ["Pass","the","inputs","through","to","the","underlying","MXNet","model",",","keeping","track","of","which","items","in","the","input","are","tensors","requiring","gradients",".","If","the","model","returns","a","single","value",",","it","is","converted","into","a","one-element","tuple",".","Return","the","outputs","and","a","callback","to","backpropagate","."]
code: def begin_update(self, inputs: ArgsKwargs):
      """Pass the inputs through to the underlying MXNet model, keeping
      track of which items in the input are tensors requiring gradients.
      If the model returns a single value, it is converted into a one-element
      tuple. Return the outputs and a callback to backpropagate.
      """
      mx.autograd.set_training(train_mode=True)
      mx.autograd.set_recording(True)
      output = self._model(*inputs.args, **inputs.kwargs)
  
      def backprop(grads):
          mx.autograd.set_recording(False)
          mx.autograd.backward(*grads.args, **grads.kwargs)
          return convert_recursive(
              lambda x: hasattr(x, "grad"), lambda x: x.grad, inputs
          )
  
      return output, backprop
  
file_path: thinc/thinc/shims/mxnet.py
imports: import copy
  from typing import Any, cast
  import srsly
  from ..compat import mxnet
  from ..optimizers import Optimizer
  from ..types import ArgsKwargs, FloatsXd
  from ..util import convert_recursive, get_array_module, make_tempfile, mxnet2xp, xp2mxnet
  from .shim import Shim
label_desc: Use image node_id 3 for calling the MXNetShim obj's underlying member method code with example usage: obj.begin_update(inputs) and returns: output,  backprop, convert_recursive