docstr: RNN Module forward.
  
  Parameters
  ----------
  x_in
      Tuple of Tensors containing the features of the input sequence. The tuple has elements (past target,
      historic future covariates, future covariates, static covariates). The shape of the past target is
      `(batch_size, input_length, input_size)`.
  h
      Optionally, the hidden state.
  
  Returns
  -------
  Tuple[torch.Tensor, torch.Tensor]
      Tuple of Tensors with elements (RNN output, hidden state). The RNN output Tensor has shape
      `(batch_size, output_chunk_length, target_size, nr_params)`. It contains the outputs at every
      time step of the input sequence. During training the whole tensor is used as output, whereas during
      prediction we only use y[:, -1, :]. However, this module always returns the whole Tensor.
docstr_tok: ["RNN","Module","forward",".","Parameters","--","--","--","--","--","x_in","Tuple","of","Tensors","containing","the","features","of","the","input","sequence",".","The","tuple","has","elements","(","past","target",",","historic","future","covariates",",","future","covariates",",","static","covariates",")",".","The","shape","of","the","past","target","is","`","(","batch_size",",","input_length",",","input_size",")","`",".","h","Optionally",",","the","hidden","state",".","Returns","--","--","--","-","Tuple","[","torch.Tensor",",","torch.Tensor","]","Tuple","of","Tensors","with","elements","(","RNN","output",",","hidden","state",")",".","The","RNN","output","Tensor","has","shape","`","(","batch_size",",","output_chunk_length",",","target_size",",","nr_params",")","`",".","It","contains","the","outputs","at","every","time","step","of","the","input","sequence",".","During","training","the","whole","tensor","is","used","as","output",",","whereas","during","prediction","we","only","use","y","[",":",",","-1",",",":","]",".","However",",","this","module","always","returns","the","whole","Tensor","."]
code: def forward(
      self, x_in: Tuple, h: Optional[torch.Tensor] = None
  ) -> Tuple[torch.Tensor, torch.Tensor]:
      """RNN Module forward.
  
      Parameters
      ----------
      x_in
          Tuple of Tensors containing the features of the input sequence. The tuple has elements (past target,
          historic future covariates, future covariates, static covariates). The shape of the past target is
          `(batch_size, input_length, input_size)`.
      h
          Optionally, the hidden state.
  
      Returns
      -------
      Tuple[torch.Tensor, torch.Tensor]
          Tuple of Tensors with elements (RNN output, hidden state). The RNN output Tensor has shape
          `(batch_size, output_chunk_length, target_size, nr_params)`. It contains the outputs at every
          time step of the input sequence. During training the whole tensor is used as output, whereas during
          prediction we only use y[:, -1, :]. However, this module always returns the whole Tensor.
      """
      pass
  
imports: import inspect
  from abc import ABC, abstractmethod
  from typing import Optional, Sequence, Tuple, Type, Union
  import torch
  import torch.nn
  from darts.logging import get_logger, raise_if_not, raise_log
  from darts.models.forecasting.pl_forecasting_module import PLDualCovariatesModule, io_processor
  from darts.models.forecasting.torch_forecasting_model import DualCovariatesTorchModel
  from darts.timeseries import TimeSeries
  from darts.utils.data import DualCovariatesShiftedDataset, TrainingDataset
label_desc: Use image node_id 2 for calling the CustomRNNModule obj's underlying member method code with example usage: obj.forward(x_in, h) without return types