tf_agents.utils.common.function_in_tf1
Wrapper that returns common.function if using TF1.
tf_agents.utils.common.function_in_tf1(
*args, **kwargs
)
This allows for code that assumes autodeps is available to be written once,
in the same way, for both TF1 and TF2.
Usage:
train = function_in_tf1()(agent.train)
loss = train(experience)
Args |
*args
|
Arguments for common.function.
|
**kwargs
|
Keyword arguments for common.function.
|
Returns |
A callable that wraps a function.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-04-26 UTC.
[null,null,["Last updated 2024-04-26 UTC."],[],[]]