class_docstr: Class to construct a distribution given the output of a network.
code: def loss(
      self,
      target: torch.Tensor,
      distr_args: Tuple[torch.Tensor, ...],
      loc: Optional[torch.Tensor] = None,
      scale: Optional[torch.Tensor] = None,
  ) -> torch.Tensor:
      distribution = self.distribution(distr_args, loc=loc, scale=scale)
      nll = -distribution.log_prob(target)
      if self.beta > 0.0:
          variance = distribution.variance
          nll = nll * (variance.detach() ** self.beta)
      return nll
  
imports: from typing import Dict, Optional, Tuple
  import numpy
  import torch
  import torch.nn.functional
  from torch.distributions import Beta, Distribution, Gamma, Laplace, Normal, Poisson
  from gluonts.core.component import validated
  from gluonts.model.forecast_generator import DistributionForecastGenerator, ForecastGenerator
  from gluonts.torch.distributions import AffineTransformed
  from .output import Output
label_desc: Use image node_id 4 for calling the DistributionOutput obj's underlying member method code with example usage: obj.loss(target, distr_args, loc, scale) and returns: nll