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 predict(self, X: ArgsKwargs):
      old_phase = tf.keras.backend.learning_phase()
      tf.keras.backend.set_learning_phase(0)
      Y = self._model(*X.args, **X.kwargs)
      tf.keras.backend.set_learning_phase(old_phase)
      return Y
  
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 4 for calling the TensorFlowShim obj's underlying member method code with example usage: obj.predict(X) and returns: Y