tf_agents.utils.common.function

View source on GitHub

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.