Module: tfm.nlp.layers.util

Keras-based transformer block layer.

Classes

class TfFunctionIfEagerDecorator: Helper decorator function to optionally apply the @tf.function annotation.

Functions

filter_kwargs(...): In place removes unused options in kwargs.

tf_function_if_eager(...): Applies the @tf.function decorator only if running in eager mode.