class_docstr: Interface between a TensorFlow model and a Thinc Model. This container is
  *not* a Thinc Model subclass itself.
  
  Reference for custom training:
  https://www.tensorflow.org/tutorials/customization/custom_training_walkthrough
class_docstr_tok: ["Interface","between","a","TensorFlow","model","and","a","Thinc","Model",".","This","container","is","*","not","*","a","Thinc","Model","subclass","itself",".","Reference","for","custom","training",":","https",":","\/\/www.tensorflow.org\/tutorials\/customization\/custom_training_walkthrough"]
code: def use_params(self, params):
      key_prefix = f"tensorflow_{self.id}_"
      # state dict stores key as name and value as numpy array
      state_dict = {}
      for k, v in params.items():
          if hasattr(k, "startswith") and k.startswith(key_prefix):
              if cupy is None:
                  assert isinstance(v, numpy.ndarray)
              else:  # pragma: no cover
                  if isinstance(v, cupy.core.core.ndarray):
                      v = cupy.asnumpy(v)
                  assert isinstance(v, numpy.ndarray)
              state_dict[k.replace(key_prefix, "")] = v
      if state_dict:
          backup = self._create_state_dict()
          self._load_weights_from_state_dict(state_dict)
          yield
          self._load_weights_from_state_dict(backup)
      else:
          yield
  
imports: import contextlib
  import copy
  from io import BytesIO
  from typing import Any, Dict, List, Optional
  import catalogue
  import numpy
  from ..backends import Ops, get_current_ops
  from ..compat import cupy, h5py
  from ..compat import tensorflow
  from ..optimizers import Optimizer
  from ..types import ArgsKwargs, ArrayXd
  from ..util import get_array_module
  from .shim import Shim
label_desc: Use image node_id 9 for calling the TensorFlowShim obj's underlying member method code with example usage: obj.use_params(params) without return types