Module: tf_agents.specs
Stay organized with collections
Save and categorize content based on your preferences.
Module for numpy array and tf.Tensor
shape and dtype specifications.
Modules
array_spec
module: A class to describe the shape and dtype of numpy arrays.
bandit_spec_utils
module: Bandit related tensor spec utilities.
distribution_spec
module: Spec definition for tensorflow_probability.Distribution.
tensor_spec
module: Utilities related to TensorSpec class.
Classes
class ArraySpec
: Describes a numpy array or scalar shape and dtype.
class BoundedArraySpec
: An ArraySpec
that specifies minimum and maximum values.
Functions
from_spec(...)
: Maps the given spec into corresponding TensorSpecs keeping bounds.
is_bounded(...)
is_continuous(...)
is_discrete(...)
sample_spec_nest(...)
: Samples the given nest of specs.
zero_spec_nest(...)
: Create zero tensors for a given spec.
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.
[null,null,["Last updated 2024-04-26 UTC."],[],[],null,["# Module: tf_agents.specs\n\n\u003cbr /\u003e\n\n|--------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/agents/blob/v0.19.0/tf_agents/specs/__init__.py) |\n\nModule for numpy array and [`tf.Tensor`](https://www.tensorflow.org/api_docs/python/tf/Tensor) shape and dtype specifications.\n\nModules\n-------\n\n[`array_spec`](../tf_agents/specs/array_spec) module: A class to describe the shape and dtype of numpy arrays.\n\n[`bandit_spec_utils`](../tf_agents/specs/bandit_spec_utils) module: Bandit related tensor spec utilities.\n\n[`distribution_spec`](../tf_agents/specs/distribution_spec) module: Spec definition for tensorflow_probability.Distribution.\n\n[`tensor_spec`](../tf_agents/specs/tensor_spec) module: Utilities related to TensorSpec class.\n\nClasses\n-------\n\n[`class ArraySpec`](../tf_agents/specs/ArraySpec): Describes a numpy array or scalar shape and dtype.\n\n[`class BoundedArraySpec`](../tf_agents/specs/BoundedArraySpec): An `ArraySpec` that specifies minimum and maximum values.\n\nFunctions\n---------\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[`sample_spec_nest(...)`](../tf_agents/specs/sample_spec_nest): Samples the given nest of specs.\n\n[`zero_spec_nest(...)`](../tf_agents/specs/zero_spec_nest): Create zero tensors for a given spec."]]