garage.tf.policies.policy
¶
Base class for policies in TensorFlow.
-
class
Policy
¶ Bases:
garage.np.policies.Policy
Base class for policies in TensorFlow.
-
abstract
get_action
(self, observation)¶ Get action sampled from the policy.
-
abstract
get_actions
(self, observations)¶ Get actions given observations.
-
property
state_info_specs
(self)¶ State info specification.
- Returns
- keys and shapes for the information related to the
module’s state when taking an action.
- Return type
List[str]
-
property
state_info_keys
(self)¶ State info keys.
- Returns
- keys for the information related to the module’s state
when taking an input.
- Return type
List[str]
-
reset
(self, do_resets=None)¶ Reset the policy.
This is effective only to recurrent policies.
do_resets is an array of boolean indicating which internal states to be reset. The length of do_resets should be equal to the length of inputs, i.e. batch size.
- Parameters
do_resets (numpy.ndarray) – Bool array indicating which states to be reset.
-
property
env_spec
(self)¶ Policy environment specification.
- Returns
Environment specification.
- Return type
garage.EnvSpec
-
property
observation_space
(self)¶ Observation space.
- Returns
The observation space of the environment.
- Return type
akro.Space
-
property
action_space
(self)¶ Action space.
- Returns
The action space of the environment.
- Return type
akro.Space
-
abstract