class_docstr: Objax to Tensorflow converter, which converts Objax module to tf.Module.
docstr: Create a Tensorflow module from Objax module.
  
  Args:
      module: Objax module to be converted to Tensorflow tf.Module.
docstr_tok: ["Create","a","Tensorflow","module","from","Objax","module",".","Args",":","module",":","Objax","module","to","be","converted","to","Tensorflow","tf.Module","."]
code: def __init__(self, module: Module):
      """Create a Tensorflow module from Objax module.
  
      Args:
          module: Objax module to be converted to Tensorflow tf.Module.
      """
      from jax.experimental import jax2tf
  
      assert hasattr(
          tf, "__version__"
      ), "Tensorflow must be installed for Objax2Tf to work."
      assert (
          tf.__version__ >= "2.0"
      ), "Objax2Tf works only with Tensorflow 2."
      assert isinstance(
          module, Module
      ), "Input argument to Objax2Tf must be an Objax module."
  
      super().__init__()
  
      module_vars = module.vars()
  
      def wrapped_op(tensor_list: List[JaxArray], kwargs, *args):
          original_values = module_vars.tensors()
          try:
              module_vars.assign(tensor_list)
              return module(*args, **kwargs)
          finally:
              module_vars.assign(original_values)
  
      tf_function = jax2tf.convert(wrapped_op)
      self._tf_vars = [tf.Variable(v) for v in module_vars.tensors()]
      self._tf_call = tf_function
  
imports: from typing import List
  from objax.module import Module
  from objax.typing import JaxArray
label_desc: Use image node_id 1 to create a new Objax2Tf object from inherited base classes: tf with example: obj = Objax2Tf(module)