class_docstr: A Keras layer for applying a tf.Transform output to input layers.
code: def __init__(
      self,
      tft_output: TFTransformOutput,
      exported_as_v1: Optional[bool] = None,
  ):
      super().__init__(trainable=False)
      self._tft_output = tft_output
      if exported_as_v1 is None:
          self._exported_as_v1 = saved_transform_io.exported_as_v1(
              tft_output.transform_savedmodel_dir
          )
      else:
          self._exported_as_v1 = exported_as_v1
      self._saved_model_loader_value = None
      self._loaded_saved_model_graph = None
      if tf.compat.v1.executing_eagerly_outside_functions():
          # The model must be tracked by assigning to an attribute of the Keras
          # layer. Hence, we track the attributes of _saved_model_loader here as
          # well.
          self._saved_model_loader_tracked_dict = (
              self._saved_model_loader.__dict__
          )
  
      # TODO(b/162055065): This is needed because otherwise we'd get an error in
      # some cases:
      # ValueError: Your Layer or Model is in an invalid state. This can happen
      # if you are interleaving estimator/non-estimator models or interleaving
      # models/layers made in tf.compat.v1.Graph.as_default() with models/layers
      # created outside of it. Converting a model to an estimator (via
      # model_to_estimator) invalidates all models/layers made before the
      # conversion (even if they were not the model converted to an estimator).
      # Similarly, making a layer or a model inside a a tf.compat.v1.Graph
      # invalidates all layers/models you previously made outside of the graph.
      self._originally_built_as_v1 = True
  
imports: import json
  import os
  from typing import Any, Dict, List, Mapping, Optional
  import numpy
  import tensorflow
  from tensorflow_transform import common
  from tensorflow_transform import common_types
  from tensorflow_transform import graph_tools
  from tensorflow_transform.analyzers import sanitized_vocab_filename
  from tensorflow_transform.keras_lib import tf_keras
  from tensorflow_transform.saved import saved_transform_io
  from tensorflow_transform.saved import saved_transform_io_v2
  from tensorflow_transform.tf_metadata import dataset_metadata
  from tensorflow_transform.tf_metadata import metadata_io
  from tensorflow_transform.tf_metadata import schema_utils
  from tensorflow.python.framework import ops
  from tensorflow.tools.docs import doc_controls
  from tensorflow_metadata.proto.v0 import schema_pb2
label_desc: Use image node_id 1 to create a new TransformFeaturesLayer object from inherited base classes: tf_keras with example: obj = TransformFeaturesLayer(tft_output, exported_as_v1)