class_docstr: Base network for the :class:`ForkingSeq2SeqEstimator`.
  
  Parameters
  ----------
  encoder: Seq2SeqEncoder
      encoder block.
  enc2dec: Seq2SeqEnc2Dec
      encoder to decoder mapping block.
  decoder: Seq2SeqDecoder
      decoder block.
  quantile_output
      quantile output
  distr_output
      distribution output
  context_length: int,
      length of the encoding sequence.
  cardinality: List[int],
      number of values of each categorical feature.
  embedding_dimension: List[int],
      dimension of the embeddings for categorical features.
  scaling
      Whether to automatically scale the target values. (default: True)
  scaling_decoder_dynamic_feature
      Whether to automatically scale the dynamic features for the decoder.
      (default: False)
  dtype
      (default: np.float32)
  num_forking: int,
      decides how much forking to do in the decoder. 1 reduces to seq2seq and
      enc_len reduces to MQ-C(R)NN.
  kwargs: dict
      dictionary of Gluon HybridBlock parameters
class_docstr_tok: ["Base","network","for","the",":","class",":","`","ForkingSeq2SeqEstimator","`",".","Parameters","--","--","--","--","--","encoder",":","Seq2SeqEncoder","encoder","block",".","enc2dec",":","Seq2SeqEnc2Dec","encoder","to","decoder","mapping","block",".","decoder",":","Seq2SeqDecoder","decoder","block",".","quantile_output","quantile","output","distr_output","distribution","output","context_length",":","int",",","length","of","the","encoding","sequence",".","cardinality",":","List","[","int","]",",","number","of","values","of","each","categorical","feature",".","embedding_dimension",":","List","[","int","]",",","dimension","of","the","embeddings","for","categorical","features",".","scaling","Whether","to","automatically","scale","the","target","values",".","(","default",":","True",")","scaling_decoder_dynamic_feature","Whether","to","automatically","scale","the","dynamic","features","for","the","decoder",".","(","default",":","False",")","dtype","(","default",":","np.float32",")","num_forking",":","int",",","decides","how","much","forking","to","do","in","the","decoder",".","1","reduces","to","seq2seq","and","enc_len","reduces","to","MQ-C","(","R",")","NN",".","kwargs",":","dict","dictionary","of","Gluon","HybridBlock","parameters"]
code: def __init__(
      self,
      encoder: Seq2SeqEncoder,
      enc2dec: Seq2SeqEnc2Dec,
      decoder: Seq2SeqDecoder,
      context_length: int,
      cardinality: List[int],
      embedding_dimension: List[int],
      distr_output: Optional[DistributionOutput] = None,
      quantile_output: Optional[QuantileOutput] = None,
      scaling: bool = True,
      scaling_decoder_dynamic_feature: bool = False,
      dtype: Type = np.float32,
      num_forking: Optional[int] = None,
      **kwargs,
  ) -> None:
      super().__init__(**kwargs)
  
      assert (distr_output is None) != (quantile_output is None)
  
      self.encoder = encoder
      self.enc2dec = enc2dec
      self.decoder = decoder
      self.distr_output = distr_output
      self.quantile_output = quantile_output
      self.scaling = scaling
      self.scaling_decoder_dynamic_feature = (
          scaling_decoder_dynamic_feature
      )
      self.dtype = dtype
      self.num_forking = (
          num_forking if num_forking is not None else context_length
      )
  
      if self.scaling:
          self.scaler = MeanScaler()
      else:
          self.scaler = NOPScaler()
  
      if self.scaling_decoder_dynamic_feature:
          self.scaler_decoder_dynamic_feature = MeanScaler(axis=1)
      else:
          self.scaler_decoder_dynamic_feature = NOPScaler(axis=1)
  
      with self.name_scope():
          if self.quantile_output:
              self.quantile_proj = (
                  self.quantile_output.get_quantile_proj()
              )
              self.loss = self.quantile_output.get_loss()
          else:
              assert self.distr_output is not None
              self.distr_args_proj = self.distr_output.get_args_proj()
          self.embedder = FeatureEmbedder(
              cardinalities=cardinality,
              embedding_dims=embedding_dimension,
              dtype=self.dtype,
          )
  
imports: from typing import List, Optional, Tuple, Type
  import numpy
  from mxnet import gluon
  from gluonts.core.component import validated
  from gluonts.mx import Tensor
  from gluonts.mx.block.decoder import Seq2SeqDecoder
  from gluonts.mx.block.enc2dec import Seq2SeqEnc2Dec
  from gluonts.mx.block.encoder import Seq2SeqEncoder
  from gluonts.mx.block.feature import FeatureEmbedder
  from gluonts.mx.block.quantile_output import QuantileOutput
  from gluonts.mx.block.scaler import MeanScaler, NOPScaler
  from gluonts.mx.distribution import DistributionOutput
  from gluonts.mx.util import weighted_average
label_desc: Use image node_id 1 to create a new ForkingSeq2SeqNetworkBase object from inherited base classes: gluon with example: obj = ForkingSeq2SeqNetworkBase(encoder, enc2dec, decoder, context_length, cardinality, embedding_dimension, distr_output, quantile_output, scaling, scaling_decoder_dynamic_feature, dtype, num_forking)