tf.types.experimental.ConcreteFunction

Base class for differentiable graph functions.

Inherits From: Callable

A ConcreteFunction encapsulates the original graph function definition with support for differentiability under tf.GradientTape contexts. In the process, it may generate new graph functions (using the original) to efficiently perform forwards and backwards passes.

function_type Returns a FunctionType describing this callable.
inference_fn Returns the original AtomicFunction owned by this ConcreteFunction.

Methods

__call__

View source

Executes this callable.

This behaves like a regular op - in eager mode, it immediately starts execution, returning results. In graph mode, it creates ops which return symbolic TensorFlow values (like tf.Tensor, tf.data.Dataset, etc.). For example, tf.function callables typically generate a tf.raw_ops.PartitionedCall op, but not always - the exact operations being generated are an internal implementation detail.

Args
*args positional argument for this call
**kwargs keyword arguments for this call

Returns
The execution results.