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.
|