class_docstr: An :class:`MQDNNEstimator` with a Recurrent Neural Network (RNN) as an
  encoder and a multi-quantile MLP as a decoder.
  
  Implements the MQ-RNN Forecaster, proposed in [WTN+17]_.
  
  Note that MQRNN uses ValidationSplitSampler as its default
  train_sampler. If context_length is less than the length of the input
  time series, only one example will be used for training.
code: def __init__(
      self,
      prediction_length: int,
      freq: str,
      context_length: Optional[int] = None,
      decoder_mlp_dim_seq: Optional[List[int]] = None,
      trainer: Trainer = Trainer(),
      quantiles: Optional[List[float]] = None,
      distr_output: Optional[DistributionOutput] = None,
      scaling: Optional[bool] = None,
      scaling_decoder_dynamic_feature: bool = False,
      num_forking: Optional[int] = None,
      is_iqf: bool = True,
      batch_size: int = 32,
      train_sampler: Optional[InstanceSampler] = None,
      validation_sampler: Optional[InstanceSampler] = None,
  ) -> None:
      assert (
          prediction_length > 0
      ), f"Invalid prediction length: {prediction_length}."
      assert decoder_mlp_dim_seq is None or all(
          d > 0 for d in decoder_mlp_dim_seq
      ), "Elements of `mlp_hidden_dimension_seq` should be > 0"
      assert quantiles is None or all(
          0 <= d <= 1 for d in quantiles
      ), "Elements of `quantiles` should be >= 0 and <= 1"
  
      self.decoder_mlp_dim_seq = (
          decoder_mlp_dim_seq
          if decoder_mlp_dim_seq is not None
          else [30]
      )
      self.quantiles = (
          quantiles
          if (quantiles is not None) or (distr_output is not None)
          else [
              0.025,
              0.1,
              0.2,
              0.3,
              0.4,
              0.5,
              0.6,
              0.7,
              0.8,
              0.9,
              0.975,
          ]
      )
      self.is_iqf = is_iqf
  
      # `use_static_feat` and `use_dynamic_feat` always True because network
      # always receives input; either from the input data or constants
      encoder = RNNEncoder(
          mode="gru",
          hidden_size=50,
          num_layers=1,
          bidirectional=True,
          prefix="encoder_",
          use_static_feat=True,
          use_dynamic_feat=True,
      )
  
      decoder = ForkingMLPDecoder(
          dec_len=prediction_length,
          final_dim=self.decoder_mlp_dim_seq[-1],
          hidden_dimension_sequence=self.decoder_mlp_dim_seq[:-1],
          prefix="decoder_",
      )
  
      if not self.quantiles:
          quantile_output = None
      elif is_iqf:
          quantile_output = IncrementalQuantileOutput(self.quantiles)
      else:
          quantile_output = QuantileOutput(self.quantiles)
  
      super().__init__(
          encoder=encoder,
          decoder=decoder,
          quantile_output=quantile_output,
          distr_output=distr_output,
          freq=freq,
          prediction_length=prediction_length,
          context_length=context_length,
          trainer=trainer,
          scaling=scaling,
          scaling_decoder_dynamic_feature=scaling_decoder_dynamic_feature,
          num_forking=num_forking,
          train_sampler=train_sampler,
          validation_sampler=validation_sampler,
          batch_size=batch_size,
      )
  
imports: import logging
  from distutils.util import strtobool
  from typing import List, Optional
  import mxnet
  import numpy
  from gluonts.core.component import validated
  from gluonts.dataset.stat import calculate_dataset_statistics
  from gluonts.mx.block.decoder import ForkingMLPDecoder
  from gluonts.mx.block.encoder import HierarchicalCausalConv1DEncoder, RNNEncoder
  from gluonts.mx.block.quantile_output import QuantileOutput, IncrementalQuantileOutput
  from gluonts.mx.distribution import DistributionOutput
  from gluonts.mx.trainer import Trainer
  from gluonts.transform import InstanceSampler
  from ._forking_estimator import ForkingSeq2SeqEstimator
label_desc: Use image node_id 1 to create a new MQRNNEstimator object from inherited base classes: ForkingSeq2SeqEstimator with example: obj = MQRNNEstimator(prediction_length, freq, context_length, decoder_mlp_dim_seq, trainer, quantiles, distr_output, scaling, scaling_decoder_dynamic_feature, num_forking, is_iqf, batch_size, train_sampler, validation_sampler)