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"]
docstr: similar to tf.keras.models.clone_model()
  But the tf.keras.models.clone_model changes the names of tf.Variables.
  This method even preserves that
docstr_tok: ["similar","to","tf.keras.models.clone_model","(",")","But","the","tf.keras.models.clone_model","changes","the","names","of","tf.Variables",".","This","method","even","preserves","that"]
code: def _clone_model(self):
      """similar to tf.keras.models.clone_model()
      But the tf.keras.models.clone_model changes the names of tf.Variables.
      This method even preserves that
      """
      model_json_config = self._model.to_json()
      tf.keras.backend.clear_session()
      self._model = tf.keras.models.model_from_json(model_json_config)
      self._load_weights_from_state_dict()
  
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 10 for calling the TensorFlowShim obj's underlying member method code with example usage: obj._clone_model() without return types