tf_agents.policies.policy_saver.specs_from_collect_data_spec
Stay organized with collections
Save and categorize content based on your preferences.
Creates policy specs from specs loaded from disk.
tf_agents.policies.policy_saver.specs_from_collect_data_spec(
loaded_policy_specs: tf_agents.typing.types.NestedTensorSpec
) -> Dict[tf_agents.typing.types.NestedSpec
, tf_agents.typing.types.NestedSpec
]
The PolicySaver saves policy specs next to the saved model as
a struct.StructuredValue
proto. This recreates the
original specs from the proto.
Pass the proto loaded from the file with tensor_spec.from_pbtxt_file()
to this function.
Args |
loaded_policy_specs
|
struct.StructuredValue proto that had been
previously created by PolicySaver as a pbtxt.
|
Returns |
A dict with specs extracted from the proto. The dict contains the following
keys and values. Except time_step_spec all the specs are nests of
ArraySpecs .
collect_data_spec : Collect data spec for the policy.
time_step_spec : TimeStepSpec for the policy.
action_spec : Action spec for the policy
policy_state_spec : State spec for the policy.
info_spec : Info spec for the policy.
|
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-04-26 UTC."],[],[]]