stable_learning_control.algos.tf2.policies.critics.L_critic

Lyapunov critic policy.

This module contains a TensorFlow 2.x implementation of the Lyapunov Critic policy of Han et al. 2020.

Classes

LCritic

Soft Lyapunov critic Network.

Module Contents

class stable_learning_control.algos.tf2.policies.critics.L_critic.LCritic(obs_dim, act_dim, hidden_sizes, activation=nn.relu, name='lyapunov_critic', **kwargs)[source]

Bases: tf.keras.Model

Soft Lyapunov critic Network.

L[source]

The layers of the network.

Type:

tf.keras.Sequential

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 (tf.keras.activations, optional) – The activation function. Defaults to tf.nn.relu.

  • name (str, optional) – The Lyapunov critic name. Defaults to lyapunov_critic.

  • **kwargs – All kwargs to pass to the tf.keras.Model. Can be used to add additional inputs or outputs.

L[source]
call(inputs)[source]

Perform forward pass through the network.

Parameters:

inputs (tuple) –

tuple containing:

  • obs (tf.Tensor): The tensor of observations.

  • act (tf.Tensor): The tensor of actions.

Returns:

The tensor containing the lyapunov values of the input observations and actions.

Return type:

tf.Tensor