Thanks for tuning in to Google I/O. View all sessions on demandWatch on demand

Module: tfm.nlp.layers.util

Keras-based transformer block layer.


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


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

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