tf.types.experimental.GenericFunction

Base class for polymorphic graph functions.

Inherits From: Callable

Graph functions are Python callable objects that dispatch calls to a TensorFlow graph. Polymorphic graph functions can be backed by multiple TF graphs, and automatically select the appropriate specialization based on the type of input they were called with. They may also create specializations on the fly if necessary, for example by tracing.

Also see tf.function.

Methods

experimental_get_compiler_ir

View source

Returns compiler IR for the compiled function.

This API is intended only for debugging as there are no guarantees on backwards compatibility of returned IR or the allowed values of stage.

Args
*args Arguments used for compilation; same arguments as used for calling the function. Need to be eager tensors.
**kwargs Keyword arguments used for compilation.

Returns
Function callable with the following kwargs: