class_docstr: Multivariate quantile loss based on the article
  `Multivariate Quantile Function Forecaster <http://arxiv.org/abs/2202.11316>`_.
  
  Requires install of additional library:
  ``pip install pytorch-forecasting[mqf2]``
class_docstr_tok: ["Multivariate","quantile","loss","based","on","the","article","`","Multivariate","Quantile","Function","Forecaster","<","http",":","\/\/arxiv.org\/abs\/2202.11316",">","`","_",".","Requires","install","of","additional","library",":","``","pip","install","pytorch-forecasting","[","mqf2","]","``"]
code: def map_x_to_distribution(
      self, x: torch.Tensor
  ) -> distributions.Distribution:
      distr = self.distribution_class(
          picnn=self.picnn,
          hidden_state=x[..., :-2],
          prediction_length=self.prediction_length,
          is_energy_score=self.is_energy_score,
          es_num_samples=self.es_num_samples,
          beta=self.beta,
      )
      # rescale
      loc = x[..., -2][:, None]
      scale = x[..., -1][:, None]
      scaler = distributions.AffineTransform(loc=loc, scale=scale)
      if self._transformation is None:
          return self.transformed_distribution_class(distr, [scaler])
      else:
          return self.transformed_distribution_class(
              distr,
              [
                  scaler,
                  TorchNormalizer.get_transform(self._transformation)[
                      "inverse_torch"
                  ],
              ],
          )
  
imports: from typing import Any, Callable, Dict, List, Optional, Tuple, Union
  import numpy
  from sklearn.base import BaseEstimator
  import torch
  from torch import distributions, nn
  import torch.nn.functional
  from pytorch_forecasting.data.encoders import TorchNormalizer, softplus_inv
  from pytorch_forecasting.metrics.base_metrics import DistributionLoss, MultivariateDistributionLoss
label_desc: Use image node_id 3 for calling the MQF2DistributionLoss obj's underlying member method code with example usage: obj.map_x_to_distribution(x) and returns: self, self