Module: tf_agents.specs.tensor_spec
Stay organized with collections
Save and categorize content based on your preferences.
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.
Other Members |
absolute_import
|
Instance of __future__._Feature
|
division
|
Instance of __future__._Feature
|
print_function
|
Instance of __future__._Feature
|
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."],[],[],null,["# Module: tf_agents.specs.tensor_spec\n\n\u003cbr /\u003e\n\n|-----------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/agents/blob/v0.19.0/tf_agents/specs/tensor_spec.py) |\n\nUtilities related to TensorSpec class.\n\nFunctions\n---------\n\n[`add_outer_dim(...)`](../../tf_agents/specs/tensor_spec/add_outer_dim): Adds an outer dimension to the shape of input specs.\n\n[`add_outer_dims_nest(...)`](../../tf_agents/specs/tensor_spec/add_outer_dims_nest): Adds outer dimensions to the shape of input specs.\n\n[`from_packed_proto(...)`](../../tf_agents/specs/tensor_spec/from_packed_proto): Decodes a packed Any proto containing the structured value for the spec.\n\n[`from_pbtxt_file(...)`](../../tf_agents/specs/tensor_spec/from_pbtxt_file): Loads a spec encoded as a struct_pb2.StructuredValue from a pbtxt file.\n\n[`from_proto(...)`](../../tf_agents/specs/tensor_spec/from_proto): Decodes a struct_pb2.StructuredValue proto into a nested spec.\n\n[`from_spec(...)`](../../tf_agents/specs/from_spec): Maps the given spec into corresponding TensorSpecs keeping bounds.\n\n[`is_bounded(...)`](../../tf_agents/specs/is_bounded)\n\n[`is_continuous(...)`](../../tf_agents/specs/is_continuous)\n\n[`is_discrete(...)`](../../tf_agents/specs/is_discrete)\n\n[`remove_outer_dims_nest(...)`](../../tf_agents/specs/tensor_spec/remove_outer_dims_nest): Removes the specified number of outer dimensions from the input spec nest.\n\n[`sample_bounded_spec(...)`](../../tf_agents/specs/tensor_spec/sample_bounded_spec): Samples uniformily the given bounded spec.\n\n[`sample_spec_nest(...)`](../../tf_agents/specs/sample_spec_nest): Samples the given nest of specs.\n\n[`to_array_spec(...)`](../../tf_agents/specs/tensor_spec/to_array_spec): Converts TensorSpec into ArraySpec.\n\n[`to_nest_array_spec(...)`](../../tf_agents/specs/tensor_spec/to_nest_array_spec): (Deprecated) Alias for `to_array_spec`.\n\n[`to_nest_placeholder(...)`](../../tf_agents/specs/tensor_spec/to_nest_placeholder): Converts a nest of TensorSpecs to a nest of matching placeholders.\n\n[`to_pbtxt_file(...)`](../../tf_agents/specs/tensor_spec/to_pbtxt_file): Saves a spec encoded as a struct_pb2.StructuredValue in a pbtxt file.\n\n[`to_placeholder(...)`](../../tf_agents/specs/tensor_spec/to_placeholder): Creates a placeholder from TensorSpec.\n\n[`to_placeholder_with_default(...)`](../../tf_agents/specs/tensor_spec/to_placeholder_with_default): Creates a placeholder from TensorSpec.\n\n[`to_proto(...)`](../../tf_agents/specs/tensor_spec/to_proto): Encodes a nested spec into a struct_pb2.StructuredValue proto.\n\n[`with_dtype(...)`](../../tf_agents/specs/tensor_spec/with_dtype): Updates dtypes of all specs in the input spec.\n\n[`zero_spec_nest(...)`](../../tf_agents/specs/zero_spec_nest): Create zero tensors for a given spec.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Other Members ------------- ||\n|-----------------|-----------------------------------|\n| absolute_import | Instance of `__future__._Feature` |\n| division | Instance of `__future__._Feature` |\n| print_function | Instance of `__future__._Feature` |\n\n\u003cbr /\u003e"]]