View source on GitHub |
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 .
|