code: def __init__(
      self,
      input_dim: int,
      output_dim: int,
      num_history: int = 1,
      cell: str = "GRU",
      num_layers: int = 1,
      hidden_size: int = 256,
      bidirectional: bool = False,
      hidden_units: Optional[List[int]] = None,
      *,
      mapping_type: str = "basic",
      bias: bool = True,
      activation: str = "ReLU",
      batch_norm: bool = False,
      dropout: float = 0.0,
      encoder_settings: Optional[Dict[str, MLEncoderSettings]] = None,
      global_encoder_settings: Optional[MLGlobalEncoderSettings] = None,
  ):
      super().__init__(
          encoder_settings=encoder_settings,
          global_encoder_settings=global_encoder_settings,
      )
      if self.encoder is not None:
          input_dim += self.encoder.dim_increment
      self.input_dim = input_dim
      self.output_dim = output_dim
      self.num_history = num_history
      rnn_dim = self._init_rnn(
          cell, num_layers, hidden_size, bidirectional
      )
      self.head = FCNN(
          rnn_dim,
          output_dim,
          1,
          hidden_units,
          mapping_type=mapping_type,
          bias=bias,
          activation=activation,
          batch_norm=batch_norm,
          dropout=dropout,
      )
  
file_path: carefree-learn/cflearn/models/ml/rnn.py
imports: import torch.nn
  import torch.nn.init
  from torch import no_grad
  from torch import Tensor
  from typing import Dict
  from typing import List
  from typing import Optional
  from .fcnn import FCNN
  from typing import Dict
  from typing import Optional
  from .base import MLModel
  from ...schema import MLEncoderSettings
  from ...schema import MLGlobalEncoderSettings
label_desc: Use image node_id 1 to create a new RNN object from inherited base classes: MLModel with example: obj = RNN(input_dim, output_dim, num_history, cell, num_layers, hidden_size, bidirectional, hidden_units)