garage.torch.q_functions
¶
PyTorch Q-functions.
-
class
ContinuousMLPQFunction
(env_spec, **kwargs)¶ Bases:
garage.torch.modules.MLPModule
Implements a continuous MLP Q-value network.
It predicts the Q-value for all actions based on the input state. It uses a PyTorch neural network module to fit the function of Q(s, a).
-
output_dim
¶ Return output dimension of network.
Returns: Output dimension of network. Return type: int
-
forward
(self, observations, actions)¶ Return Q-value(s).
Parameters: - observations (np.ndarray) – observations.
- actions (np.ndarray) – actions.
Returns: Output value
Return type: torch.Tensor
-