class_docstr: Helper class for creating the log of a
  categorical distribution object.
  
  Parameters
  ----------
  T : scalar, default None
      Relaxation temperature
  num_events : Int
      Number of events.
  prob : Tensor
      Probabilities of each event.
  logit : Tensor
      The log-odds of each event
class_docstr_tok: ["Helper","class","for","creating","the","log","of","a","categorical","distribution","object",".","Parameters","--","--","--","--","--","T",":","scalar",",","default","None","Relaxation","temperature","num_events",":","Int","Number","of","events",".","prob",":","Tensor","Probabilities","of","each","event",".","logit",":","Tensor","The","log-odds","of","each","event"]
docstr: Compute the log-likelihood of `value`
  
  Parameters
  ----------
  value : Tensor
      samples from Relaxed Categorical distribution
  
  Returns
  -------
  Tensor
      log-likelihood of `value`
docstr_tok: ["Compute","the","log-likelihood","of","`","value","`","Parameters","--","--","--","--","--","value",":","Tensor","samples","from","Relaxed","Categorical","distribution","Returns","--","--","--","-","Tensor","log-likelihood","of","`","value","`"]
code: def log_prob(self, value):
      """Compute the log-likelihood of `value`
  
      Parameters
      ----------
      value : Tensor
          samples from Relaxed Categorical distribution
  
      Returns
      -------
      Tensor
          log-likelihood of `value`
      """
      K = self.num_events  # Python scalar
      logit = self.logit
      y = logit - value * self.T
      log_sum_exp = np.log(np.exp(y).sum(-1, keepdims=True) + 1e-20)
      log_scale = lgamma(K) - np.log(self.T) * (-(K - 1))
      return (y - log_sum_exp).sum(-1) + log_scale
  
file_path: mxnet/python/mxnet/gluon/probability/distributions/relaxed_one_hot_categorical.py
imports: from math import lgamma
  from .distribution import Distribution
  from .transformed_distribution import TransformedDistribution
  from ..transformation import ExpTransform
  from .utils import prob2logit, logit2prob, cached_property
  from .constraint import Real, Simplex
  from ....None import np, npx
label_desc: Use image node_id 4 for calling the _LogRelaxedOneHotCategorical obj's underlying member method code with example usage: obj.log_prob(value) and returns: unknown