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","."]
code: def to_device(self, device_type: str, device_id: int):
      if device_type == "cpu":
          self._model = self.copy(mx.cpu())
      elif device_type == "gpu":
          self._model = self.copy(mx.gpu())
      else:
          msg = f"Unexpected device_type: {device_type}. Try 'cpu' or 'gpu'."
          raise ValueError(msg)
  
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 6 for calling the MXNetShim obj's underlying member method code with example usage: obj.to_device(device_type, device_id) without return types