Module: tf_agents.specs.tensor_spec

Utilities related to TensorSpec class.

Functions

add_outer_dim(...): Adds an outer dimension to the shape of input specs.

add_outer_dims_nest(...): Adds outer dimensions to the shape of input specs.

from_packed_proto(...): Decodes a packed Any proto containing the structured value for the spec.

from_pbtxt_file(...): Loads a spec encoded as a struct_pb2.StructuredValue from a pbtxt file.

from_proto(...): Decodes a struct_pb2.StructuredValue proto into a nested spec.

from_spec(...): Maps the given spec into corresponding TensorSpecs keeping bounds.

is_bounded(...)

is_continuous(...)

is_discrete(...)

remove_outer_dims_nest(...): Removes the specified number of outer dimensions from the input spec nest.

sample_bounded_spec(...): Samples uniformily the given bounded spec.

sample_spec_nest(...): Samples the given nest of specs.

to_array_spec(...): Converts TensorSpec into ArraySpec.

to_nest_array_spec(...): (Deprecated) Alias for to_array_spec.

to_nest_placeholder(...): Converts a nest of TensorSpecs to a nest of matching placeholders.

to_pbtxt_file(...): Saves a spec encoded as a struct_pb2.StructuredValue in a pbtxt file.

to_placeholder(...): Creates a placeholder from TensorSpec.

to_placeholder_with_default(...): Creates a placeholder from TensorSpec.

to_proto(...): Encodes a nested spec into a struct_pb2.StructuredValue proto.

with_dtype(...): Updates dtypes of all specs in the input spec.

zero_spec_nest(...): Create zero tensors for a given spec.

absolute_import Instance of __future__._Feature
division Instance of __future__._Feature
print_function Instance of __future__._Feature