class_docstr: A class representing probability distributions.
class_docstr_tok: ["A","class","representing","probability","distributions","."]
docstr: Compute the loss at `x` according to the distribution.
  
  By default, this method returns the negative of `log_prob`. For some
  distributions, however, the log-density is not easily computable
  and therefore other loss functions are computed.
  
  Parameters
  ----------
  x
      Tensor of shape `(*batch_shape, *event_shape)`.
  
  Returns
  -------
  Tensor
      Tensor of shape `batch_shape` containing the value of the loss
      for each event in `x`.
docstr_tok: ["Compute","the","loss","at","`","x","`","according","to","the","distribution",".","By","default",",","this","method","returns","the","negative","of","`","log_prob","`",".","For","some","distributions",",","however",",","the","log-density","is","not","easily","computable","and","therefore","other","loss","functions","are","computed",".","Parameters","--","--","--","--","--","x","Tensor","of","shape","`","(","*","batch_shape",",","*","event_shape",")","`",".","Returns","--","--","--","-","Tensor","Tensor","of","shape","`","batch_shape","`","containing","the","value","of","the","loss","for","each","event","in","`","x","`","."]
code: def loss(self, x: Tensor) -> Tensor:
      r"""
      Compute the loss at `x` according to the distribution.
  
      By default, this method returns the negative of `log_prob`. For some
      distributions, however, the log-density is not easily computable
      and therefore other loss functions are computed.
  
      Parameters
      ----------
      x
          Tensor of shape `(*batch_shape, *event_shape)`.
  
      Returns
      -------
      Tensor
          Tensor of shape `batch_shape` containing the value of the loss
          for each event in `x`.
      """
      return -self.log_prob(x)
  
imports: from typing import cast, Any, List, Optional, Tuple
  import mxnet
  import numpy
  from mxnet import autograd
  from gluonts.mx import Tensor
label_desc: Use image node_id 5 for calling the Distribution obj's underlying member method code with example usage: obj.loss(x) and returns: unknown