def __init__(
        self,
        input_size: int,
        hidden_dim: int,
        num_layers: int,
        target_size: int,
        nr_params: int,
        num_layers_out_fc: Optional[list] = None,
        dropout: float = 0.0,
        activation: str = "ReLU",
        **kwargs,
    ):
        """This class allows to create custom block RNN modules that can later be used with Darts'
        :class:`BlockRNNModel`. It adds the backbone that is required to be used with Darts'
        :class:`TorchForecastingModel` and :class:`BlockRNNModel`.

        To create a new module, subclass from :class:`CustomBlockRNNModule` and:

        * Define the architecture in the module constructor (`__init__()`)

        * Add the `forward()` method and define the logic of your module's forward pass

        * Use the custom module class when creating a new :class:`BlockRNNModel` with parameter `model`.

        You can use `darts.models.forecasting.block_rnn_model._BlockRNNModule` as an example.

        Parameters
        ----------
        input_size
            The dimensionality of the input time series.
        hidden_dim
            The number of features in the hidden state `h` of the RNN module.
        num_layers
            The number of recurrent layers.
        target_size
            The dimensionality of the output time series.
        nr_params
            The number of parameters of the likelihood (or 1 if no likelihood is used).
        num_layers_out_fc
            A list containing the dimensions of the hidden layers of the fully connected NN.
            This network connects the last hidden layer of the PyTorch RNN module to the output.
        dropout
            The fraction of neurons that are dropped in all-but-last RNN layers.
        activation
            The name of the activation function to be applied between the layers of the fully connected network.
        **kwargs
            all parameters required for :class:`darts.models.forecasting.pl_forecasting_module.PLForecastingModule`
            base class.
        """
        super().__init__(**kwargs)

        # Defining parameters
        self.input_size = input_size
        self.hidden_dim = hidden_dim
        self.num_layers = num_layers
        self.target_size = target_size
        self.nr_params = nr_params
        self.num_layers_out_fc = [] if num_layers_out_fc is None else num_layers_out_fc
        self.dropout = dropout
        self.activation = activation
        self.out_len = self.output_chunk_length
This class allows to create custom block RNN modules that can later be used with Darts'
        :class:`BlockRNNModel`. It adds the backbone that is required to be used with Darts'
        :class:`TorchForecastingModel` and :class:`BlockRNNModel`.

        To create a new module, subclass from :class:`CustomBlockRNNModule` and:

        * Define the architecture in the module constructor (`__init__()`)

        * Add the `forward()` method and define the logic of your module's forward pass

        * Use the custom module class when creating a new :class:`BlockRNNModel` with parameter `model`.

        You can use `darts.models.forecasting.block_rnn_model._BlockRNNModule` as an example.

        Parameters
        ----------
        input_size
            The dimensionality of the input time series.
        hidden_dim
            The number of features in the hidden state `h` of the RNN module.
        num_layers
            The number of recurrent layers.
        target_size
            The dimensionality of the output time series.
        nr_params
            The number of parameters of the likelihood (or 1 if no likelihood is used).
        num_layers_out_fc
            A list containing the dimensions of the hidden layers of the fully connected NN.
            This network connects the last hidden layer of the PyTorch RNN module to the output.
        dropout
            The fraction of neurons that are dropped in all-but-last RNN layers.
        activation
            The name of the activation function to be applied between the layers of the fully connected network.
        **kwargs
            all parameters required for :class:`darts.models.forecasting.pl_forecasting_module.PLForecastingModule`
            base class.
        
darts/models/forecasting/block_rnn_model.py