Skip to content

NetworkArchitectureSettings

Full path: schola.scripts.rllib.train.settings.NetworkArchitectureSettings

Dataclass for network architecture settings used in the RLlib training process. This class defines the parameters for the neural network architecture used for policy and value function approximation. This includes the hidden layer sizes, activation functions, and whether to use an attention mechanism. These settings help to control the complexity and capacity of the neural network model used in the training process.

NetworkArchitectureSettings(fcnet_hiddens = <factory>,
activation = ActivationFunctionEnum.ReLU,
use_lstm = False, lstm_cell_size = 64,
max_seq_len = 20)

Parameters

  • fcnet_hiddens (Annotated)

  • activation (ActivationFunctionEnum)

  • use_lstm (bool)

  • lstm_cell_size (Annotated)

  • max_seq_len (Annotated)

Methods

init

__init__(fcnet_hiddens = <factory>, activation = ActivationFunctionEnum.ReLU,
use_lstm = False, lstm_cell_size = 64, max_seq_len = 20)

Parameters

  • fcnet_hiddens (Annotated)

  • activation (ActivationFunctionEnum)

  • use_lstm (bool)

  • lstm_cell_size (Annotated)

  • max_seq_len (Annotated)

Attributes

activation

activation

The activation function to use for the fully connected network. This specifies the non-linear activation function applied to each neuron in the hidden layers of the neural network. The default is ReLU (Rectified Linear Unit), which is a commonly used activation function in deep learning due to its simplicity and effectiveness. Other options may include Tanh, Sigmoid, etc. This can be adjusted based on the specific requirements of the problem and the architecture of the neural network.


fcnet_hiddens

fcnet_hiddens

The hidden layer architecture for the fully connected network. This specifies the number of neurons in each hidden layer of the neural network used for the policy and value function approximation. The default is [512, 512], which means two hidden layers with 512 neurons each. This can be adjusted based on the complexity of the problem and the size of the input state space.


lstm_cell_size

lstm_cell_size

The size of the LSTM cell. This specifies the number of neurons in the LSTM cell. The default is 64, which is a common choice for many applications.


max_seq_len

max_seq_len

Maximum sequence length for stateful (e.g. LSTM) models. Used in config.rl_module(model_config={…}). Only relevant when use_lstm is True.


use_lstm

use_lstm

Whether to use an LSTM layer in the model. This specifies whether to include an LSTM layer in the neural network architecture. LSTM is a type of recurrent neural network that is designed to process sequential data.


name

name