<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/models/blob/v2.20.0/official/nlp/modeling/layers/util.py#L22-L41) |

Helper decorator function to optionally apply the @tf.function annotation.

    tfm.nlp.layers.util.TfFunctionIfEagerDecorator(
        **kwargs
    )

## Methods

### `__call__`

[View source](https://github.com/tensorflow/models/blob/v2.20.0/official/nlp/modeling/layers/util.py#L28-L41)

    __call__(
        func
    )

Call self as a function.