class_docstr: Distribution class for the model MQF2 proposed in the paper
  ``Multivariate Quantile Function Forecaster``
  by Kan, Aubet, Januschowski, Park, Benidis, Ruthotto, Gasthaus
  
  Parameters
  ----------
  picnn
      A SequentialNet instance of a
      partially input convex neural network (picnn)
  hidden_state
      hidden_state obtained by unrolling the RNN encoder
      shape = (batch_size, context_length, hidden_size) in training
      shape = (batch_size, hidden_size) in inference
  prediction_length
      Length of the prediction horizon
  is_energy_score
      If True, use energy score as objective function
      otherwise use maximum likelihood as
      objective function (normalizing flows)
  es_num_samples
      Number of samples drawn to approximate the energy score
  beta
      Hyperparameter of the energy score (power of the two terms)
  threshold_input
      Clamping threshold of the (scaled) input when maximum
      likelihood is used as objective function
      this is used to make the forecaster more robust
      to outliers in training samples
  validate_args
      Sets whether validation is enabled or disabled
      For more details, refer to the descriptions in
      torch.distributions.distribution.Distribution
class_docstr_tok: ["Distribution","class","for","the","model","MQF2","proposed","in","the","paper","``","Multivariate","Quantile","Function","Forecaster","``","by","Kan",",","Aubet",",","Januschowski",",","Park",",","Benidis",",","Ruthotto",",","Gasthaus","Parameters","--","--","--","--","--","picnn","A","SequentialNet","instance","of","a","partially","input","convex","neural","network","(","picnn",")","hidden_state","hidden_state","obtained","by","unrolling","the","RNN","encoder","shape","=","(","batch_size",",","context_length",",","hidden_size",")","in","training","shape","=","(","batch_size",",","hidden_size",")","in","inference","prediction_length","Length","of","the","prediction","horizon","is_energy_score","If","True",",","use","energy","score","as","objective","function","otherwise","use","maximum","likelihood","as","objective","function","(","normalizing","flows",")","es_num_samples","Number","of","samples","drawn","to","approximate","the","energy","score","beta","Hyperparameter","of","the","energy","score","(","power","of","the","two","terms",")","threshold_input","Clamping","threshold","of","the","(","scaled",")","input","when","maximum","likelihood","is","used","as","objective","function","this","is","used","to","make","the","forecaster","more","robust","to","outliers","in","training","samples","validate_args","Sets","whether","validation","is","enabled","or","disabled","For","more","details",",","refer","to","the","descriptions","in","torch.distributions.distribution.Distribution"]
code: def event_dim(self) -> int:
      return 0
  
imports: from typing import Dict, List, Optional, Tuple, cast
  import torch
  from torch.distributions import AffineTransform, TransformedDistribution
  from torch.distributions.normal import Normal
  from gluonts.core.component import validated
  from gluonts.itertools import prod
  from gluonts.torch.distributions import DistributionOutput
  from gluonts.torch.model.mqf2.module import PICNN
label_desc: Use image node_id 10 for calling the MQF2Distribution obj's underlying member method code with example usage: obj.event_dim() and returns: int