class_docstr: A representation of a Keras in/output during Functional API construction.
  
  `KerasTensor`s are tensor-like objects that represent the symbolic inputs
  and outputs of Keras layers during Functional model construction. They are
  comprised of the `tf.TypeSpec` of the (Composite)Tensor that will be
  consumed/produced in the corresponding location of the Functional model.
  
  KerasTensors are intended as a private API, so users should never need to
  directly instantiate `KerasTensor`s.
  
  **Building Functional Models with KerasTensors**
  `tf.keras.Input` produces `KerasTensor`s that represent the symbolic inputs
  to your model.
  
  Passing a `KerasTensor` to a `tf.keras.Layer` `__call__` lets the layer know
  that you are building a Functional model. The layer __call__ will
  infer the output signature and return `KerasTensor`s with `tf.TypeSpec`s
  corresponding to the symbolic outputs of that layer call. These output
  `KerasTensor`s will have all of the internal KerasHistory metadata attached
  to them that Keras needs to construct a Functional Model.
  
  Currently, layers infer the output signature by:
    * creating a scratch `FuncGraph`
    * making placeholders in the scratch graph that match the input typespecs
    * Calling `layer.call` on these placeholders
    * extracting the signatures of the outputs before clearing the scratch graph
  
  (Note: names assigned to KerasTensors by this process are not guaranteed to
  be unique, and are subject to implementation details).
  
  `tf.nest` methods are used to insure all of the inputs/output data
  structures get maintained, with elements swapped between KerasTensors and
  placeholders.
  
  In rare cases (such as when directly manipulating shapes using Keras layers),
  the layer may be able to partially infer the value of the output in addition
  to just inferring the signature.
  When this happens, the returned KerasTensor will also contain the inferred
  value information. Follow-on layers can use this information.
  during their own output signature inference.
  E.g. if one layer produces a symbolic `KerasTensor` that the next layer uses
  as the shape of its outputs, partially knowing the value helps infer the
  output shape.
  
  **Automatically converting TF APIs to layers**:
  If you passing a `KerasTensor` to a TF API that supports dispatching,
  Keras will automatically turn that API call into a lambda
  layer in the Functional model, and return KerasTensors representing the
  symbolic outputs.
  
  Most TF APIs that take only tensors as input and produce output tensors
  will support dispatching.
  
  Calling a `tf.function` does not support dispatching, so you cannot pass
  `KerasTensor`s as inputs to a `tf.function`.
  
  Higher-order APIs that take methods which produce tensors (e.g. `tf.while`,
  `tf.map_fn`, `tf.cond`) also do not currently support dispatching. So, you
  cannot directly pass KerasTensors as inputs to these APIs either. If you
  want to use these APIs inside of a Functional model, you must put them inside
  of a custom layer.
  
  Args:
    type_spec: The `tf.TypeSpec` for the symbolic input created by
      `tf.keras.Input`, or symbolically inferred for the output
      during a symbolic layer `__call__`.
    inferred_value: (Optional) a non-symbolic static value, possibly partially
      specified, that could be symbolically inferred for the outputs during
      a symbolic layer `__call__`. This will generally only happen when
      grabbing and manipulating `tf.int32` shapes directly as tensors.
      Statically inferring values in this way and storing them in the
      KerasTensor allows follow-on layers to infer output signatures
      more effectively. (e.g. when using a symbolic shape tensor to later
      construct a tensor with that shape).
    name: (optional) string name for this KerasTensor. Names automatically
      generated by symbolic layer `__call__`s are not guaranteed to be unique,
      and are subject to implementation details.
class_docstr_tok: ["A","representation","of","a","Keras","in\/output","during","Functional","API","construction",".","`","KerasTensor","`","s","are","tensor-like","objects","that","represent","the","symbolic","inputs","and","outputs","of","Keras","layers","during","Functional","model","construction",".","They","are","comprised","of","the","`","tf.TypeSpec","`","of","the","(","Composite",")","Tensor","that","will","be","consumed\/produced","in","the","corresponding","location","of","the","Functional","model",".","KerasTensors","are","intended","as","a","private","API",",","so","users","should","never","need","to","directly","instantiate","`","KerasTensor","`","s",".","*","*","Building","Functional","Models","with","KerasTensors","*","*","`","tf.keras.Input","`","produces","`","KerasTensor","`","s","that","represent","the","symbolic","inputs","to","your","model",".","Passing","a","`","KerasTensor","`","to","a","`","tf.keras.Layer","`","`","__call__","`","lets","the","layer","know","that","you","are","building","a","Functional","model",".","The","layer","__call__","will","infer","the","output","signature","and","return","`","KerasTensor","`","s","with","`","tf.TypeSpec","`","s","corresponding","to","the","symbolic","outputs","of","that","layer","call",".","These","output","`","KerasTensor","`","s","will","have","all","of","the","internal","KerasHistory","metadata","attached","to","them","that","Keras","needs","to","construct","a","Functional","Model",".","Currently",",","layers","infer","the","output","signature","by",":","*","creating","a","scratch","`","FuncGraph","`","*","making","placeholders","in","the","scratch","graph","that","match","the","input","typespecs","*","Calling","`","layer.call","`","on","these","placeholders","*","extracting","the","signatures","of","the","outputs","before","clearing","the","scratch","graph","(","Note",":","names","assigned","to","KerasTensors","by","this","process","are","not","guaranteed","to","be","unique",",","and","are","subject","to","implementation","details",")",".","`","tf.nest","`","methods","are","used","to","insure","all","of","the","inputs\/output","data","structures","get","maintained",",","with","elements","swapped","between","KerasTensors","and","placeholders",".","In","rare","cases","(","such","as","when","directly","manipulating","shapes","using","Keras","layers",")",",","the","layer","may","be","able","to","partially","infer","the","value","of","the","output","in","addition","to","just","inferring","the","signature",".","When","this","happens",",","the","returned","KerasTensor","will","also","contain","the","inferred","value","information",".","Follow-on","layers","can","use","this","information",".","during","their","own","output","signature","inference",".","E.g",".","if","one","layer","produces","a","symbolic","`","KerasTensor","`","that","the","next","layer","uses","as","the","shape","of","its","outputs",",","partially","knowing","the","value","helps","infer","the","output","shape",".","*","*","Automatically","converting","TF","APIs","to","layers","*","*",":","If","you","passing","a","`","KerasTensor","`","to","a","TF","API","that","supports","dispatching",",","Keras","will","automatically","turn","that","API","call","into","a","lambda","layer","in","the","Functional","model",",","and","return","KerasTensors","representing","the","symbolic","outputs",".","Most","TF","APIs","that","take","only","tensors","as","input","and","produce","output","tensors","will","support","dispatching",".","Calling","a","`","tf.function","`","does","not","support","dispatching",",","so","you","can","not","pass","`","KerasTensor","`","s","as","inputs","to","a","`","tf.function","`",".","Higher-order","APIs","that","take","methods","which","produce","tensors","(","e.g",".","`","tf.while","`",",","`","tf.map_fn","`",",","`","tf.cond","`",")","also","do","not","currently","support","dispatching",".","So",",","you","can","not","directly","pass","KerasTensors","as","inputs","to","these","APIs","either",".","If","you","want","to","use","these","APIs","inside","of","a","Functional","model",",","you","must","put","them","inside","of","a","custom","layer",".","Args",":","type_spec",":","The","`","tf.TypeSpec","`","for","the","symbolic","input","created","by","`","tf.keras.Input","`",",","or","symbolically","inferred","for","the","output","during","a","symbolic","layer","`","__call__","`",".","inferred_value",":","(","Optional",")","a","non-symbolic","static","value",",","possibly","partially","specified",",","that","could","be","symbolically","inferred","for","the","outputs","during","a","symbolic","layer","`","__call__","`",".","This","will","generally","only","happen","when","grabbing","and","manipulating","`","tf.int32","`","shapes","directly","as","tensors",".","Statically","inferring","values","in","this","way","and","storing","them","in","the","KerasTensor","allows","follow-on","layers","to","infer","output","signatures","more","effectively",".","(","e.g",".","when","using","a","symbolic","shape","tensor","to","later","construct","a","tensor","with","that","shape",")",".","name",":","(","optional",")","string","name","for","this","KerasTensor",".","Names","automatically","generated","by","symbolic","layer","`","__call__","`","s","are","not","guaranteed","to","be","unique",",","and","are","subject","to","implementation","details","."]
code: def __str__(self):
      symbolic_description = ""
      inferred_value_string = ""
      name_string = ""
  
      if hasattr(self, "_keras_history"):
          layer = self._keras_history.layer
          symbolic_description = (
              ", description=\"created by layer '%s'\"" % (layer.name,)
          )
      if self._inferred_value is not None:
          inferred_value_string = (
              ", inferred_value=%s" % self._inferred_value
          )
      if self.name is not None:
          name_string = ", name='%s'" % self._name
      return "KerasTensor(type_spec=%s%s%s%s)" % (
          self.type_spec,
          inferred_value_string,
          name_string,
          symbolic_description,
      )
  
imports: from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.framework import tensor
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import type_spec
  from tensorflow.python.keras.utils import object_identity
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops.ragged import ragged_operators
  from tensorflow.python.ops.ragged import ragged_tensor
  from tensorflow.python.util import nest
label_desc: Use image node_id 14 for calling the KerasTensor obj's underlying member method code with example usage: obj.__str__() and returns: unknown