<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.21.0/tensorflow/python/types/core.py#L142-L166) |

Base class for graph functions.

Inherits From: [`Callable`](https://www.tensorflow.org/api_docs/python/tf/types/experimental/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.

<br />

<br />

<br />

| ## Attributes ||
|---|---|
| `function_type` | Returns a FunctionType describing this callable. |

<br />

## Methods

### `call_with_captures`

[View source](https://github.com/tensorflow/tensorflow/blob/v2.21.0/tensorflow/python/types/core.py#L156-L166)

    call_with_captures(
        args, kwargs, captures
    )

Calls this AtomicFunction with captures as defined by its FunctionType.

<br />

<br />

<br />

| Args ||
|---|---|
| `args` | Tuple containing positional arguments |
| `kwargs` | Dict containing keyword arguments |
| `captures` | Tuple of tensors supplying captured tensor values. |

<br />

<br />

<br />

<br />

| Returns ||
|---|---|
| A structured output value based on the inputs. ||

<br />

### `__call__`

[View source](https://github.com/tensorflow/tensorflow/blob/v2.21.0/tensorflow/python/types/core.py#L124-L139)

    __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`](https://www.tensorflow.org/api_docs/python/tf/Tensor), [`tf.data.Dataset`](https://www.tensorflow.org/api_docs/python/tf/data/Dataset),
etc.). For example, [`tf.function`](https://www.tensorflow.org/api_docs/python/tf/function) callables typically generate a
[`tf.raw_ops.PartitionedCall`](https://www.tensorflow.org/api_docs/python/tf/raw_ops/PartitionedCall) op, but not always - the
exact operations being generated are an internal implementation detail.

<br />

<br />

<br />

| Args ||
|---|---|
| `*args` | positional argument for this call |
| `**kwargs` | keyword arguments for this call |

<br />

<br />

<br />

<br />

| Returns ||
|---|---|
| The execution results. ||

<br />