tf_agents.utils.common.function

Wrapper for tf.function with TF Agents-specific customizations.

Used in the notebooks

Used in the tutorials

Example:

@common.function()
def my_eager_code(x, y):
  ...

*args Args for tf.function.
**kwargs Keyword args for tf.function.

A tf.function wrapper.