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"]
code: def __init__(
      self, T, num_events, prob=None, logit=None, validate_args=None
  ):
      self.T = T
      if num_events > 0:
          num_events = int(num_events)
          self.num_events = num_events
      else:
          raise ValueError(
              "`num_events` should be greater than zero. "
              + "Received num_events={}".format(num_events)
          )
      if (prob is None) == (logit is None):
          raise ValueError(
              "Either `prob` or `logit` must be specified, but not both. "
              + "Received prob={}, logit={}".format(prob, logit)
          )
  
      if prob is not None:
          self.prob = prob
      else:
          self.logit = logit
  
      super(_LogRelaxedOneHotCategorical, self).__init__(
          event_dim=1, validate_args=validate_args
      )
  
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 1 to create a new _LogRelaxedOneHotCategorical object from inherited base classes: Distribution with example: obj = _LogRelaxedOneHotCategorical(T, num_events, prob, logit, validate_args)