W3cubDocs

/TensorFlow 2.9

tf.types.experimental.SupportsTracingProtocol

A protocol allowing custom classes to control tf.function retracing.

Methods

__tf_tracing_type__

View source

Returns the tracing type of this object.

The tracing type is used to build the signature of a tf.function when traced, and to match arguments with existing signatures. When a Function object is called, tf.function looks at the tracing type of the call arguments. If an existing signature of matching type exists, it will be used. Otherwise, a new function is traced, and its signature will use the tracing type of the call arguments.

Args
context a context object created for each function call for tracking information about the call arguments as a whole
Returns
The tracing type of this object.

© 2022 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 4.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r2.9/api_docs/python/tf/types/experimental/SupportsTracingProtocol