View source on GitHub
|
Base class for graph functions.
Inherits From: Callable
An AtomicFunction encapsulates a single graph function definition.
AtomicFunction can be called directly only if no captures are needed
according to the FunctionType. If captures are present, please use
call_with_captures instead.
AtomicFunction does not support gradients. Please use the parent
ConcreteFunction if you need gradient support.
function_type
call_with_capturescall_with_captures(
args, kwargs, captures
)
Calls this AtomicFunction with captures as defined by its FunctionType.
args
kwargs
captures
__call____call__(
*args, **kwargs
)
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
**kwargs
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
Last updated 2024-04-26 UTC.