tf_agents.policies.utils.get_num_actions_from_tensor_spec
Validates action_spec
and returns number of actions.
tf_agents.policies.utils.get_num_actions_from_tensor_spec(
action_spec: tf_agents.typing.types.BoundedTensorSpec
) -> int
action_spec
must specify a scalar int32 or int64 with minimum zero.
Args |
action_spec
|
a BoundedTensorSpec .
|
Returns |
The number of actions described by action_spec .
|
Raises |
ValueError
|
if action_spec is not an bounded scalar int32 or int64 spec
with minimum 0.
|
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."],[],[]]