alibi.models.tensorflow.actor_critic module

This module contains the Tensorflow implementation of actor-critic networks used in the Counterfactual with Reinforcement Learning for both data modalities. The models’ architectures follow the standard actor-critic design and can have broader use-cases.

class alibi.models.tensorflow.actor_critic.Actor(hidden_dim, output_dim, **kwargs)[source]

Bases: tensorflow.keras.Model

Actor network. The network follows the standard actor-critic architecture used in Deep Reinforcement Learning. The model is used in Counterfactual with Reinforcement Learning (CFRL) for both data modalities (images and tabular). The hidden dimension used for the all experiments is 256, which is a common choice in most benchmarks.

__init__(hidden_dim, output_dim, **kwargs)[source]

Constructor.

Parameters
  • hidden_dim (int) – Hidden dimension

  • output_dim (int) – Output dimension

call(x, **kwargs)[source]
Return type

Tensor

class alibi.models.tensorflow.actor_critic.Critic(hidden_dim, **kwargs)[source]

Bases: tensorflow.keras.Model

Critic network. The network follows the standard actor-critic architecture used in Deep Reinforcement Learning. The model is used in Counterfactual with Reinforcement Learning (CFRL) for both data modalities (images and tabular). The hidden dimension used for the all experiments is 256, which is a common choice in most benchmarks.

__init__(hidden_dim, **kwargs)[source]

Constructor.

hidden_dim

Hidden dimension.

call(x, **kwargs)[source]
Return type

Tensor