tf_agents.agents.ppo.ppo_utils.distribution_from_spec
Convert (spec, new_distribution_params) -> Distribution
.
tf_agents.agents.ppo.ppo_utils.distribution_from_spec(
spec: tf_agents.typing.types.NestedTensorSpec
,
new_distribution_params: tf_agents.typing.types.NestedTensor
,
legacy_distribution_network: bool
) -> tf_agents.typing.types.NestedDistribution
new_distribution_params
typically comes from a logged policy info.
Args |
spec
|
A nested tensor spec. If legacy_distribution_network is True ,
these are typically actor_net.output_spec . If it's False , these are
typically the output of actor_net.create_variables() .
|
new_distribution_params
|
Parameters to merge with the spec to create a new
distribution. These were typically emitted by get_distribution_params
and stored in the replay buffer.
|
legacy_distribution_network
|
True if the spec and params were generated
from a network.DistributionNetwork .
|
Returns |
A (possibly nested set of) Distribution created from the spec
merged with the new params.
|
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."],[],[]]