stable_learning_control.algos.pytorch.policies.critics.L_critic
Lyapunov critic policy.
This module contains a Pytorch implementation of the Lyapunov Critic policy of Han et al. 2020.
Classes
Soft Lyapunov critic Network. |
Module Contents
- class stable_learning_control.algos.pytorch.policies.critics.L_critic.LCritic(obs_dim, act_dim, hidden_sizes, activation=nn.ReLU)[source]
Bases:
torch.nn.Module
Soft Lyapunov critic Network.
Initialise the LCritic object.
- Parameters:
obs_dim (int) – Dimension of the observation space.
act_dim (int) – Dimension of the action space.
hidden_sizes (list) – Sizes of the hidden layers.
activation (
torch.nn.modules.activation
, optional) – The activation function. Defaults totorch.nn.ReLU
.
- forward(obs, act)[source]
Perform forward pass through the network.
- Parameters:
obs (torch.Tensor) – The tensor of observations.
act (torch.Tensor) – The tensor of actions.
- Returns:
The tensor containing the lyapunov values of the input observations and actions.
- Return type: