rlportfolio.policy.ei3 module

class EI3

Bases: Module

__init__(initial_features: int = 3, k_short: int = 3, k_medium: int = 21, conv_mid_features: int = 3, conv_final_features: int = 20, time_window: int = 50, device: str = 'cpu') EI3

EI3 (ensemble of identical independent inception) policy network initializer.

Parameters:
  • initial_features – Number of input features.

  • k_short – Size of short convolutional kernel.

  • k_medium – Size of medium convolutional kernel.

  • conv_mid_features – Size of intermediate convolutional channels.

  • conv_final_features – Size of final convolutional channels.

  • time_window – Size of time window used as agent’s state.

  • device – Device in which the neural network will be run.

Note

Reference article: https://doi.org/10.1145/3357384.3357961.

forward(observation: Tensor, last_action: Tensor) Tensor

Policy network’s forward propagation. Defines a most favorable action of this policy given the inputs.

Parameters:
  • observation – environment observation.

  • last_action – Last action performed by agent.

Returns:

Action to be taken.