docstr: EI3 (ensemble of identical independent inception) policy network
  initializer.
  
  Args:
      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.
  
  Reference:
      Reference article: https://doi.org/10.1145/3357384.3357961.
docstr_tok: ["EI3","(","ensemble","of","identical","independent","inception",")","policy","network","initializer",".","Args",":","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",".","Reference",":","Reference","article",":","https",":","\/\/doi.org\/10.1145\/3357384.3357961","."]
code: def __init__(
      self,
      initial_features=3,
      k_short=3,
      k_medium=21,
      conv_mid_features=3,
      conv_final_features=20,
      time_window=50,
      device="cpu",
  ):
      """EI3 (ensemble of identical independent inception) policy network
      initializer.
  
      Args:
          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.
  
      Reference:
          Reference article: https://doi.org/10.1145/3357384.3357961.
      """
      super().__init__()
      self.device = device
  
      n_short = time_window - k_short + 1
      n_medium = time_window - k_medium + 1
      n_long = time_window
  
      self.short_term = nn.Sequential(
          nn.Conv2d(
              in_channels=initial_features,
              out_channels=conv_mid_features,
              kernel_size=(1, k_short),
          ),
          nn.ReLU(),
          nn.Conv2d(
              in_channels=conv_mid_features,
              out_channels=conv_final_features,
              kernel_size=(1, n_short),
          ),
          nn.ReLU(),
      )
  
      self.mid_term = nn.Sequential(
          nn.Conv2d(
              in_channels=3,
              out_channels=conv_mid_features,
              kernel_size=(1, k_medium),
          ),
          nn.ReLU(),
          nn.Conv2d(
              in_channels=conv_mid_features,
              out_channels=conv_final_features,
              kernel_size=(1, n_medium),
          ),
          nn.ReLU(),
      )
  
      self.long_term = nn.Sequential(
          nn.MaxPool2d(kernel_size=(1, n_long)), nn.ReLU()
      )
  
      self.final_convolution = nn.Conv2d(
          in_channels=2 * conv_final_features + initial_features + 1,
          out_channels=1,
          kernel_size=(1, 1),
      )
  
      self.softmax = nn.Sequential(nn.Softmax(dim=-1))
  
file_path: FinRL/finrl/agents/portfolio_optimization/architectures.py
imports: from __future__ import annotations
  import numpy
  import torch
  from torch import nn
label_desc: Use image node_id 1 to create a new EI3 object from inherited base classes: nn with example: obj = EI3(initial_features, k_short, k_medium, conv_mid_features, conv_final_features, time_window, device)