class_docstr: Converts raw neural network output into a forecast and computes loss.
class_docstr_tok: ["Converts","raw","neural","network","output","into","a","forecast","and","computes","loss","."]
docstr: Compute loss for target data given network output.
  
  Parameters
  ----------
  target
      Values of the target time series for which loss is to be computed.
  distr_args
      Arguments that can be used to construct the output distribution.
  loc
      Location parameter of the distribution, optional.
  scale
      Scale parameter of the distribution, optional.
  
  Returns
  -------
  loss_values
      Values of the loss, has same shape as target.
docstr_tok: ["Compute","loss","for","target","data","given","network","output",".","Parameters","--","--","--","--","--","target","Values","of","the","target","time","series","for","which","loss","is","to","be","computed",".","distr_args","Arguments","that","can","be","used","to","construct","the","output","distribution",".","loc","Location","parameter","of","the","distribution",",","optional",".","scale","Scale","parameter","of","the","distribution",",","optional",".","Returns","--","--","--","-","loss_values","Values","of","the","loss",",","has","same","shape","as","target","."]
code: def loss(
      self,
      target: torch.Tensor,
      distr_args: Tuple[torch.Tensor, ...],
      loc: Optional[torch.Tensor] = None,
      scale: Optional[torch.Tensor] = None,
  ) -> torch.Tensor:
      """Compute loss for target data given network output.
  
      Parameters
      ----------
      target
          Values of the target time series for which loss is to be computed.
      distr_args
          Arguments that can be used to construct the output distribution.
      loc
          Location parameter of the distribution, optional.
      scale
          Scale parameter of the distribution, optional.
  
      Returns
      -------
      loss_values
          Values of the loss, has same shape as target.
      """
      raise NotImplementedError()
  
file_path: gluonts/src/gluonts/torch/distributions/output.py
imports: from typing import Callable, Dict, Optional, Tuple, Type
  import numpy
  import torch
  import torch.nn
  from gluonts.model.forecast_generator import ForecastGenerator
  from gluonts.torch.modules.lambda_layer import LambdaLayer
label_desc: Use image node_id 3 for calling the Output obj's underlying member method code with example usage: obj.loss(target, distr_args, loc, scale) without return types